procmail
[Top] [All Lists]

Intermittent file locking issue causes procmail and then postfix timeout

2013-11-30 11:25:50

  One of my end users has an intermittent problem with a procmail
script.   It does the following:

:0 wc:     #copy all mail to "bkp"
bkp

Most of the time, this works without issue.  Every few weeks, the
following message appears in the procmail log:

procmail: Forcing lock on "bkp"
procmail: Timeout, was waiting for "bkp"

Sometimes procmail is able to release the lock (or the lock disappears)
before the postfix command timeout occurs (which is now set to an hour).
Otherwise the mail delivery fails with:

relay=local, delay=2001, delays=0.78/0.05/0/2000, dsn=5.3.0,
status=bounced (Command time limit exceeded: "procmail -t -f-")

The bkp file is very large (over 10 gigabytes) but the issue is
intermittent with several weeks in between instances of the problem and
doesn't occur for other users who have the same command and gigabyte
sized files (although none are as large as this).

The user would prefer not to use MailDir style folders and wants to keep
this as a mbox file.  Is there a way I can re-write the script to allow
mail delivery to the user's mailbox while procmail waits on the lock for
bkp? I've tried:

:0c      #copy all mail to "Saved"
{
 :0 w:
 bkp
}


Which will allow two emails before it procmail stops accepting email
again if I manually lock bkp for testing.  If I release the lock before
postfix times out, the mail will be delivered.  I would also like to
determine the root cause of the locking issue, but I haven't been able
to trigger it yet except by locking the file myself.

Thanks for your help,
-John Hancock



____________________________________________________________
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>