procmail
[Top] [All Lists]

RE: Should I tempfail when spamfiltering

2004-08-27 03:13:12
Dan Smart wrote:
Thanks.  All the add-ons to SpamAssassin now makes it a pig, so
I've had to tune how I'm doing things.

<<Dan>>

Yes, sorry to have sent you email, but now that we're at it, I'll
repeat my suggestion to use spamc -x -t 90 instead of TIMEOUT=90.

Please note that spamc by itself is by design a lightweight program,
comparable to formail.  Spamc sits blocked on a network read waiting
for spamd to finish, during which time spamc eats no CPU cycles, and
only holds 256K of memory.  If it comes to that and you either kill
spamc or it times out, spamd still does all the hard work.  Whatever
you may gain on the procmail/spamc client side, all you get back on
the spamd server side is that the annotated message doesn't actually
go across the wire.

A message bigger than spamd will accept is limited in cost, as spamc
pulls in 256001 bytes from procmail, then exits immediately.  I'll
have to post again, though, as I've just checked and spamc exits 0 in
this case.  You'll need to change the recipe to something more like:

  :0 fhw          ## If too big for spamd, just add a custom header
  * ! ^X-Spam-Checker-Version: SpamAssassin .* on $HOST
  * > 256000
  | /usr/bin/formail -A "X-VMC: BIG"

  :0 E fw         ## Don't poison Bayes and don't do extra work
  * ! ^X-Spam-Checker-Version: SpamAssassin .* on $HOST
  * ! ^TO_spamassassin-users(_at_)incubator(_dot_)apache(_dot_)org
  * ! ^TO_postfix-users@(postfix.org|cloud9.net)
  | /usr/bin/spamc -x -t 90   ## Note the timeout

  :0 e            ## Small e says "on error"
  {
    EXITCODE=75   ## EX_TEMPFAIL EXITCODE to force re-queue
    HOST          ## unset HOST to exit procmail and re-queue
  }

I'm also sending this to the list.  Crow is best eaten piping hot.

HTH again,
Mike

-----Original Message-----
From: Mike Peeler
Sent: Thursday, August 26, 2004 3:06 PM
To: Smart,Dan
Cc: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Should I tempfail when spamfiltering

I have set my procmail TIMEOUT=90 so I don't wait too long for
SpamAssassin spamc to do its thing.  Does anyone have a
suggestion if
this is too short or too long?

Too short.  In fact, don't kill spamc.  It has its own timeout:

  -t: timeout in seconds to read from spamd. 0 disables.
[default: 600]

Procmail defaults to sixteen minutes; spamc, to ten.  I'd
cut spamc's timeout in half, but no more than that.  That's
spamc -x -t 300.

HTH,
Mike


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