procmail
[Top] [All Lists]

Combining spam filters (bogo+SA)

2002-11-13 11:05:12
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"


I'm unsure of how to go about this.

Can I compound conditions, pretty much copying the entire spamassassin
section in where it just writes to bogofilter's mail folder right now?

Is there a cleaner way to handle this?


Also, how does one normally test more advanced arrangements, such as
this? Is there a way to tee incoming mail off to a file which can
somehow be imported if it turns out that bad rules are losing mail?



(My .procmailrc)

# Set to yes when debugging
VERBOSE=no
            
# Remove ## when debugging; set to no if you want minimal logging
##LOGABSTRACT=all 

# Replace $HOME/Msgs with your message directory
# Mutt and elm use $HOME/Mail
# Pine uses $HOME/mail
# Netscape Messenger uses $HOME/nsmail
# Some news clients, such as slrn & nn, use $HOME/News
MAILDIR=$HOME/Mail       # Make sure this directory exists!
                         
# Directory for storing procmail-related files
PMDIR=$HOME/.procmail
                                     
# Put ## before LOGFILE if you want no logging (not recommended)
LOGFILE=$PMDIR/log

# BogoFilter Start ...

:0HB
* ? bogofilter
{
        :0c
        | bogofilter -s

        :0
        inbox-spam-bogo
}

:0EHBc
| bogofilter -n

# Spam Assassin Start ...

:0fw
| spamassassin

:0e
{
    EXITCODE=$?
}

:0:
* ^X-Spam-Status: Yes
inbox-spam-assassin

# Spam Testing End ...


INCLUDERC=$PMDIR/apple.rc
INCLUDERC=$PMDIR/debian.rc
INCLUDERC=$PMDIR/egroups.rc
INCLUDERC=$PMDIR/freebsd.rc
INCLUDERC=$PMDIR/netbsd.rc
INCLUDERC=$PMDIR/openbsd.rc
INCLUDERC=$PMDIR/yahoo.rc

INCLUDERC=$PMDIR/lists.rc

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