At 11:08 2004-02-02 -0800, R A Lichtensteiger wrote:
[snip]
First question is whether "spamc" even needs a lock file -- does it
write to any files (including a spam/ham database) or does it simply
add headers to the message (I don't use spamassasin so I have no idea
what it does in regard to file accesses etc.)
Importantly isn't whether spamc simply writes to files, but whether itself
writes to files without performing its own file locking - as long as spamc
does it's own locking, there is no need for procmail to add another level
of locking to the mix, though having a procmail lockfile before invoking
spamc can help to keep spamc load down, you still end up with a bunch of
procmail processes waiting around.
I'd be surprised if spamc doesn't perform it's own locking on any files
which it writes to. Since source is available, you should be able to just
examine it looking for where it writes to files.
Note that procmail's locking involves a sleep period (attempt lock, realize
lockfile is already there; sleep for some seconds (see 'man procmail' and
'man procmailrc'), then try again, with an eventual timeout). Note that if
there is a spamc process running, the problem isn't likely procmail,
because it managed to invoke the process, but the process hasn't terminated.
Also, note well the kill procedure recommended in the procmail manpage if
you're off killing processes: simply killing procmail can leave lockfiles
in place.
See 'man procmailrc' search for LOCKSLEEP, LOCKTIMEOUT, TIMEOUT,
SUSPEND. You'll see that there are some pretty hefty timeouts involved.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail