procmail
[Top] [All Lists]

Re: occasional loop

2004-02-02 12:19:03
noah wrote:

<> I'm new to the list -- I hope it's okay to introduce myself with a question.

It's the usual way <g>

<> I'm pretty inexperienced with procmail. I'm using it to filter incoming
<> email through SpamAssassin on a RedHat computer. 99.9% of the time, it
<> works fine, but every once in a while I seem to get a loop where a
<> procmail process and a corresponding sendmail process get started and
<> don't stop unless I kill them manually. Once this happens, it continues
<> to happen until there are literally dozens of procmail and sendmail
<> processes running (and bogging the machine down).
<> 
<> I'm pretty sure that the problem is in my procmailrc; I disabled it for
<> a while, and the problem didn't occur during that time. The thing is,
<> the recipe is very simple, and I can't find the problem:
<> 
<> ----------
<> # send mail through SpamAssassin
<> :0 fw: spamassassin.lock
<> * !^X-Spam-Status:
<> | /usr/bin/spamc -f
<> 
<> # if SpamAssassin says it's spam, deliver it to uce
<> :0 H:
<> * ^X-Spam-Status: Yes
<> /var/spool/mail/uce
<> ----------
<> 
<> When the problem occurs, the user in question has a persistent ".lock"
<> file in /var/spool/mail (e.g., "/var/spool/mail/username.lock") -- in
<> order to get the looping processes killed, I have to manually remove the
<> lockfile first (otherwise the processes start up again immediately after
<> I kill them).
<> 
<> When the problem occurs, I see the following lines repeated a couple of
<> times in my procmail log:
<> 
<> procmail: Forcing lock on "/var/spool/mail/username.lock"
<> . . .
<> procmail: Extraneous locallockfile ignored

Your procmailrc uses a single global lock file to coordinate calls to
the "spamc" program.  If "spamc" doesn't return, or takes a long time
to run, then any further messages that come in stop processing at that
point in the procmailrc file.  Result is you see a lot of sleeping
sendmail and procmail instances in your process table, and no mail
gets delivered.

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

Reto
-- 
R A Lichtensteiger              rali(_at_)tifosi(_dot_)com

   6. Pippin hits on Eowyn in a dark corner of the Houses of Healing:
      "The hands of a Hobbit are the hands of a healer too, you know..."

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