msmtpq contains a test
if [ -f "${FQP}.*" ] ; then # ensure fqp name is unique
that is supposed to ensure that an existing queue file is not overwritten.
However this combination of -f and globbing does not seem to work.
$ cd /tmp
$ touch foo
$ if [ -f "foo" ]; then echo hi; fi
hi
$ if [ -f "foo*" ]; then echo hi; fi
$
This means that whenever a user sends more than one message per second only
the last mail will survive.
I've attached a possible fix but one might want to look into how to combine
tests and globbing correctly.
Regards,
Philipp
--- - 2011-10-19 12:14:27.531364497 +0200
+++ bin/msmtpq 2011-10-19 12:02:30.119359444 +0200
@@ -331,9 +331,9 @@
ID="$(date +%Y-%m-%d-%H.%M.%S)" # make filename id for queue
FQP="${Q}/$ID" # make fully qualified pathname
- if [ -f "${FQP}.*" ] ; then # ensure fqp name is unique
+ if [ -f "${FQP}.mail" -o -f "${FQP}.msmtp" ] ; then # ensure fqp name is unique
INC=1 # initial increment
- while [ -f "${FQP}-${INC}.*" ] ; do # fqp name w/incr exists
+ while [ -f "${FQP}-${INC}.mail" -o -f "${FQP}-${INC}.msmtp" ] ; do # fqp name w/incr exists
(( ++INC )) # bump increment
done
ID="${ID}-${INC}" # unique ; set id
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
msmtp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msmtp-users