procmail
[Top] [All Lists]

Re: Intermittent file locking issue causes procmail and then postfix timeout (procmail Digest, Vol 124, Issue 1)

2013-12-01 15:39:12
On Sun, Dec 1, 2013 at 10:48 AM, John Hancock 
<jhancock(_at_)dgp(_dot_)toronto(_dot_)edu> wrote:
I would still be interested in
knowing if anyone has tried to save to a very large file in procmail
recipe, and if so what can be done allow mail delivery to the mail spool
while waiting for a lock to be released.

This doesn't sound like it's directly a procmail issue, as the "c"
flag mentioned in your original message should allow the parent
procmail to complete delivery while the copy is either writing to, or
waiting to lock, the "bkp" file.

That you're able to get two messages delivered in this state is
perhaps a hint that postfix is limiting the number of simultaneous
delivering children, though I don't immediately see a way to configure
that in the postfix docs.

You could try causing procmail to fork *twice*:

:0c
{
  # In first child, now fork again
  :0c
  {
    # Deliver in second child
    :0:
    bkp
  }
  # Cause first child to exit, orphaning second child (we hope)
  HOST=
}

This doesn't guarantee that delivery to bkp won't time out, causing
the copy of the message to be lost -- the only solution to that is a
smaller file or different format (or faster disks).

By the way, the "w" flag is extraneous unless delivering to a pipe.
____________________________________________________________
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>