procmail
[Top] [All Lists]

Re: Lock failure

2003-08-08 07:46:28
At 14:47 2003-08-08 +0200, Frode Lillerud wrote:
I'm writing a statistical spamfilter, and once in a while I send 100'eds of
mail to myself to test it.

100's.  Try enunciating "100'eds": enunciate "100", then "100'eds".

What version of Procmail?  For that matter, what version of fetchmail?

I use fetchmail to get it from the local sendmail-setup, but it crashes
after about 300-400 mails saying "SIGPIPE thrown from an MDA or a stream
socket error".

This message is in the fetchmail sources.

'man 7 signal'

SIGPIPE 13 A Broken pipe: write to pipe with no readers

The procmail-logfile looks like this:

[..snip...]
procmail: Lock failure on "/tmp/spamwizard.lock"

Probably due to lots of other processes...

procmail: Error while writing to "formail"

Probably due to the perl script not reading ALL of its input. If you check, you might find that this happens more often on larger files than on small ones, if the perl script is reading only up to a certain point sometimes and deciding "oh, this is spam, so quit processing it now". To avoid this, add the 'i' flag to the flag line. See 'man procmailrc'.

VERBOSE=off

As a rule, I always disable verbosity when testing. Who needs all those details, right?

:0fw: /tmp/spamwizard.lock
| formail -s /root/projects/Spam-filter/spamwizard-0.16/spamwizard.pl

Do you guys see any reason for this happening? I'm open to the possibility
that my spamwizard.pl script might be hogging resources, but it should
only be running one instance at a time anyway.

But that doesn't mean that fetchmail isn't going to try to deliver multiple messages concurrently as it downloads them. Depending upon how you have fetchmail configured, it may be delivering to the LDA directly, or it may be handing the message to your MTA, which in turn is invoking the LDA. Fetchmail itself is supported elsewhere, but you should check to see if your setup allows for synchronous or asynchronous mail processing - i.e. does fetchmail retrieve a message from wherever, then pass it to the local MTA or LDA, then - while that is processing - go repeat the process, or does it wait until the MTA process has completed.

 Why the problem with the lockfile??

You may have more than one message trying to be delivered over a period of time during which the lockfile is in use.

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

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