procmail
[Top] [All Lists]

Re: burst of emails and first-in first-out processing

2009-04-24 12:16:13
On Fri, Apr 24, 2009 at 7:26 AM, Martin d'Anjou
<martin(_dot_)danjou(_at_)neterion(_dot_)com> wrote:
My procmail recipe launches commands to a queueing system and I want them to
show up in the queueing system in the same order as the emails came in.
Right now when there is a burst of email, they are not queued in the same
order as the emails show up in the mailbox. I suspect procmail forks
parallel processes and this is where the ordering is lost.

Procmail does not do this.  Your mail transport/delivery system does
this.  Procmail is merely invoked as the delivery agent, once per
message.

You can force procmail to serialize by using a global LOCKFILE (see
"man procmailrc") but this may cause performance problems for your
mail system under heavy load and is not guaranteed to cause the mail
transport to invoke the procmail instances in the exact order that the
messages arrive, only to assure that only one procmail process runs to
completion at a time.

If you need accurate queue ordering, you need to use something other
than email as the delivery mechanism, or you need to customize your
mail transport to only accept SMTP connections in a serial manner
(which again may cause problems under load).
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>