You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris Withers <li...@simplistix.co.uk> on 2004/02/26 13:03:15 UTC

Running SA from Procmail

Hi there,

I have a default install of SpamAssassin 2.63, I'm currently running it via
procmail like this:

# Spam Assassiin and other spam filtering
:0fw: spamassassin.lock
| /usr/local/spamassassin/bin/spamassassin

:0 w: spamassassin.lock
* 10 ^X-Spam-Status: Yes
$HOME/Mail/.0-Spam/

Is that the best way to go about things, or should I be doing something else?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


Re: Running SA from Procmail

Posted by Chris Withers <li...@simplistix.co.uk>.
Chip Paswater wrote:

> Mostly locking problems.

Hurm, I'm a noobie... how do I know if I'm having locking problems?

> Often Bayes would begin a rebuild then suddenly
> die in the middle leaving it's scratch and lock files laying around to trip
> up future spamassassin processes.  I even tried using "learn_to_journal"
> and other config items that would stop trying to r/w the Bayesdb but it
> didn't help.  Eventually I moved to spamd/spamc and haven't had a problem
> since.

I'll bear that in mind :-)

cheers,

Chris


Re: Running SA from Procmail

Posted by Chris Withers <li...@simplistix.co.uk>.
Chip Paswater wrote:

> I used to run that configuation.  Expect to have problems with Bayes if you
> have a decent load of messages on that system.

How did those problems manifest themselves?

cheers,

Chris


Re: Running SA from Procmail

Posted by jdow <jd...@earthlink.net>.
From: "Gary Funck" <ga...@intrepid.com>
Sent: Thursday, 2004 February, 26 07:30
> > -----Original Message-----
> > From: Jason Crowe [mailto:jcrowe@midwestglove.com]
> > Sent: Thursday, February 26, 2004 6:45 AM
> [...]
> >
> > > # Spam Assassiin and other spam filtering
> > > :0fw: spamassassin.lock
> > > | /usr/local/spamassassin/bin/spamassassin
> > >
> > > :0 w: spamassassin.lock
> > > * 10 ^X-Spam-Status: Yes
> > > $HOME/Mail/.0-Spam/
> > >
> >
> >
> > I may be wrong but I don't think you need lockfiles on either of these.
> > The first is a filter & you don't have to be worried about something
else
> > writing to it at the same time.
> > The second is a Maildir folder, it saves messages as files so you
> > don't have
> > to worry about something else writing to it.
>
> You're right that you don't need lockfiles on either rule. However, on
> the first rule, where SA is invoked, adding a lockfile is kind of a
> roll-your-own flow control/load management technique. Because SA is cup
> bound and has a fairly large memory footprint, and opens a bunch of files
> and connections, it can overload your system if many SA invocations
> start running at the same time. The lock ensures that there will be only
> on SA run per user at a time. If you can run spamc instead, there is
> much less need for locking because spamd will do the load management.

Just a note, Gary, I found the lock was necessary on the modest 133MHz
penticrash machine I am using for the server. Until I installed the lock
I had spamc routing around spamd and simply delivering emails unchecked.

{^_^}


RE: Running SA from Procmail

Posted by Gary Funck <ga...@intrepid.com>.

> -----Original Message-----
> From: Jason Crowe [mailto:jcrowe@midwestglove.com]
> Sent: Thursday, February 26, 2004 6:45 AM
[...]
> 
> > # Spam Assassiin and other spam filtering
> > :0fw: spamassassin.lock
> > | /usr/local/spamassassin/bin/spamassassin
> > 
> > :0 w: spamassassin.lock
> > * 10 ^X-Spam-Status: Yes
> > $HOME/Mail/.0-Spam/
> > 
> 
> 
> I may be wrong but I don't think you need lockfiles on either of these. 
> The first is a filter & you don't have to be worried about something else
> writing to it at the same time.
> The second is a Maildir folder, it saves messages as files so you 
> don't have
> to worry about something else writing to it.

You're right that you don't need lockfiles on either rule. However, on
the first rule, where SA is invoked, adding a lockfile is kind of a
roll-your-own flow control/load management technique. Because SA is cup
bound and has a fairly large memory footprint, and opens a bunch of files
and connections, it can overload your system if many SA invocations
start running at the same time. The lock ensures that there will be only
on SA run per user at a time. If you can run spamc instead, there is
much less need for locking because spamd will do the load management.



RE: Running SA from Procmail

Posted by Jason Crowe <jc...@midwestglove.com>.
> # Spam Assassiin and other spam filtering
> :0fw: spamassassin.lock
> | /usr/local/spamassassin/bin/spamassassin
> 
> :0 w: spamassassin.lock
> * 10 ^X-Spam-Status: Yes
> $HOME/Mail/.0-Spam/
> 


I may be wrong but I don't think you need lockfiles on either of these. 
The first is a filter & you don't have to be worried about something else
writing to it at the same time.
The second is a Maildir folder, it saves messages as files so you don't have
to worry about something else writing to it.

I would rewrite this:

> :0 w: spamassassin.lock
> * 10 ^X-Spam-Status: Yes
> $HOME/Mail/.0-Spam/

:0
* ^X-Spam-Status: Yes
$HOME/Mail/.0-Spam/


Jason