Bart Schaefer <barton(_dot_)schaefer(_at_)gmail(_dot_)com> wrote:
If that is what he's relying on, then it's obvious what the problem
is; the output to the logfile isn't necessary flushed immediately.
[...]
If you want to synchronize writes using lockfiles, you have to make
sure the write has been fully flushed to disk *before* you remove the
lockfile. In this case that means opening and closing the logfile
*inside* the trap, e.g., with a redirection like
echo whatever you want logged >> $LOGFILE
After a few days of testing, I can report that this solution does
indeed work. Over 50,000 arriving emails have passed through my
.procmailrc and there has been absolutely no corruption in the
log file.
Thanks again for explaining the problem, which wasn't so obvious
to me (and probably wasn't so obvious to others too, because no
one else could explain it).
Many thanks!
Lloyd
____________________________________________________________
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