Re: [Exim] Spamassassin Survey

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Greg Ward
Data:  
Para: Exim Users (E-mail)
CC: Paul Walsh
Asunto: Re: [Exim] Spamassassin Survey
On 10 April 2002, Mike Richardson said:
> I'm relatively new to SA but what I'd like to be able to do is to
> handle differently scored SA messages differently. e.g If a message
> scores < 5 then its not spam, if it scores >5 then its spam but if
> < 10 then still deliver it (with the appropriate X headers). If > 10
> then don't deliver (filter to another file), and if > 20 then /dev/null
> it.

[...]
> Anyone know of software, or a methodology, which can do the above
> more sensibly?


Write your own script. I have a Python script that takes care of
routing spam accordingly; it sits between Exim and SpamAssassin, and
does the following:

  * pipes the message to spamc, and reads the marked-up message
    (ie. with X-Spam-* headers added) back


  * interprets the X-Spam-* headers to see if the message is spam
    or not.  If so, save it to /var/mail/spam (a Maildir, so it's
    easy to write to).  If not, pipe it to exim to resend to the
    original intended recipient(s).


It would be fairly easy to extend this to a three-way decision instead
of two-way, and to change the logic slightly.

The main disadvantage of this is the overhead of spawning a Python
interpreter for every message, in addition to the spamc/spamd overhead
you would incur anyways (which isn't nearly as bad as starting the
spamassassin script, which starts up a Perl interpreter *and* compiles
all the SA rules). My gut instinct is that Python is about as expensive
to spawn as Perl, but my script is fairly small and doesn't import too
much stuff.

The other disadvantage is that every legitimate message requires an
additional invocation of Exim and a second message ID. I suspect this
is universal to external mail-filtering schemes, though.

Oh yeah: it'll all be online at satools.sourceforge.net before the end
of the week.

        Greg
--
Greg Ward - software developer                gward@???
MEMS Exchange                            http://www.mems-exchange.org