Hi all:
I have a customer with a Linux server that connects to us through a
dialup account, and sends us their queued mail using serialmail. The
problem they are having is that, from time to time, they have some
leftover mails that don't get sent, even if I kill all the running
instances of serialmail and start it up by hand. The situation goes more
or less like:
1) serialmail is started by a cron job, creates a lock on the outgoing
mail directory using seriallock and starts sending the messages in the
queue.
2) Before it has finished (the queue has several megabytes of
messages), the cron job gets called again, but since the lockfile is...
erm, locked, it doesn't do anything (or at least that's how I think it
works...).
3) After several hours like this, you can see in the outgoing queue
several old messages that, according to their timestamp, should have
been sent by the first serialmail invocation, but haven't. You kill all
the running instances of serialmail, start it by hand and... it starts
sending mail NOT from the very beginning of the queue (i.e. those
leftover messages), but from somewhere in the middle.
My question is: what's going on? Or, to be more precise:
-Does serialmail create a lock in the messages in the outgoing queue
too, instead of just in the lock file? Does that (hypothetical) lock
remain if I kill serialmail by hand?
-Is my assumption in 2) correct? (That is, that the second invocation
of serialmail doesn't do anything). The line I use in my crontab file
is:
/usr/local/bin/setlock -nx ~alias/outmail/seriallock
/usr/local/bin/maildirsmtp ~alias/outmail alias-outmail- [IP of the
upstream mail server] `hostname`
Where ~alias/outmail is the Maildir where the outgoing messages get
sent.
-How does serialmail "choose" which mails in the Maildir to sent first?
By filename? By timestamp? How?
In case you are wondering, yes, the leftover mails do have envelope
senders in the right format, that is, "Delivered-To:
alias-outmail-user@domain".
Anyone can help?
Paulo Jan.
DDnet.