procmail
[Top] [All Lists]

Re: Procmail, lockfiles and SpamAssassin

2006-10-25 14:22:24
On 10/25/06, Geoff Soper 
<geoff(_dot_)procmail4(_at_)alphaworks(_dot_)co(_dot_)uk> wrote:
I've got a virtualised web server (FC3, Plesk and Virtuozzo) hosting a
number of domains. I've installed SpamAssassin and call it from
.procmailrc files as described at
http://wiki.apache.org/spamassassin/UsedViaProcmail :
:0fw: spamassassin.lock
* < 256000
| spamassassin

The problem I'm facing is that a lot of incoming mail is skipping
SpamAssassin, I'm guessing that the if the lock is on, the call is
skipped rather than queued? I know it's passing the code as I've put a
filter before and after the call which adds a X header to the mail and
I'm seeing these two X headers but no evidence of the mail being
processed by SpamAssassin.

Can anyone suggest what I can do to solve this problem? I'm reluctant to
remove the lock as the SpamAssassin documentation suggests this is to
stop overloading by multiple SpamAssassin instances. I'd rather it
waited for the lock to free than skipping over it.

Hi Geoff,

If promail encounters a lock file, it will wait for it to be released.
 After a certain amount of time (the LOCKTIMEOUT and TIMEOUT
variables), I believe it will consider it a stale lock and break that
lock.

The only reason procmail should skip your recipe is if the condition
returns false.  Perhaps there are more emails bigger than 250 kb
coming through your system?  I hope not, but that's one possibility.

For debugging, I suggest turning on logging and recording the size of
the email.  Then watch the log to see if the emails that skip the
recipe are indeed smaller than 250 kb.

VERBOSE=yes
SIZE=`wc -c`  # this will be in bytes

:0fw: spamassassin.lock
* < 256000
| spamassassin

Also, if your site is experiencing a high amount of traffic, consider
using spamc/spamd, which is much faster than invoking spamassassin
every time an email comes through.  And I believe spamd will take care
of handling and queueing concurrent requests, so you wouldn't need a
lock file in your procmailrc either.

-- 
-- Matt Dunford -- zenmatic(_at_)gmail(_dot_)com

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