procmail
[Top] [All Lists]

Re: Combining spam filters (bogo+SA)

2002-11-13 12:00:50
On 13 Nov, Ink Fox wrote:
| Currently, I use bogofilter to catch spam, then if that believes a
| message is okay, I route it to spamassassin for a second check.
| 
| If bogo sees spam, I route to mailbox "in-spam-bogo"
| 
| If sa sees spam, I route to mailbox "in-spam-assassin"
| 
| If both think it's okay, I proceed to do my list filtering, etc.
| 
| 
| What I'd -like- to do would be to route to a third folder if both
| believe something is spam:
| 
| if bogo sees spam and sa sees spam, route to mailbox "in-spam-certain"
| (after some testing, perhaps this would just go to /dev/null)
| 
| if only bogo sees spam, route to mailbox "in-spam-bogo"
| 
| if only sa sees spam, route to mailbox "in-spam-assassin"
| 

Since I use neither spamassassin nor bogofilter, and know nothing of
their respective incantations in your rcfile, I'm not going to try and
modify it.  Here's a general solution that you can apply appropriately
to the rcfile.

# do bogofilter stuff
# DO NOT deliver to inbox-spam-bogo, but instead do:

SPAMSTINK=1

# do spamassassin stuff
# DO NOT deliver to inbox-spam-assassin, but instead do:

:0
* $ ${SPAMSTINK:-0}^0
*                 2^0
{ SPAMSTINK = $= }

# Now, SPAMSTINK is:
# unset if neither matched
# 1 if bogofilter only matched
# 2 if spamassassin only matched
# 3 if both matched

:0:
* $ ${SPAMSTINK:-0}^0
*                -2^0
in-spam-certain

:0E:
* $ ${SPAMSTINK:-0}^0
*                -1^0
in-spam-assassin

:0E:
* $ ${SPAMSTINK:-0}^0
in-spam-bogo

# if we're here, it matched neither bogofilter nor spamassassin


-- 
Reply to list please, or append "8" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.



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