bogofilter setup in multi-user
.rp
printer at moveupdate.com
Tue Jun 29 22:51:27 CEST 2004
We use sendmail8.12 and procmail.
In the system wide procmailrc we start off by using a few rules we want run before
bf'ing a message.
First we check to see if the sender is faking our email servers address
(276.294.301.553 for example)
:0 H
* ^Received: from 276\.294\.301\.553 \(
/usr/badmail/spam/fake_address
Next we check the subject for certain words that we know we want no part of
:0H
* ^Subject:.*(p0rn| pr0n| HGH |ha1f| curn |GB2312)|\
^Subject:.*(paris hilton|p4ris|par1s|p4r1s )|\
^Subject:.*(iagra |@gra|1agra|lagra|Cialis)|\
/dev/null
#no legit mail should have "|" in its subject
:0H
* ^Subject:.*(\|)
/var/spool/mail/junkbox
:0H:
* ^Subject:.*(â|í|Ò|Æ|¶|¯|º|Í|Á|ª|Í|¨|È|«|¿|ª|Í|¨|Ë|ë|ä|ö|ü|ï|é|¡|ã|ò)
/dev/null
Now we need to find out which enduser is the intended recipient
#ok, who is this being processed for?
:0 fhw
| formail -I "X-for: $LOGNAME"
Then we go through and see if it is for someone with special needs in their filtering
#if for Rick - do a special run for them
:0 H
* ^X-for:.*risks
{
:0fw
|bogofilter -e -p -t -o .81,.39 -l -d /home/bf-R
:0e
{ EXITCODE=75 HOST }
:0
$DEFAULT
}
:0 H
* ^X-for:.*(gren|bhot|tlale)
{
:0fw
|bogofilter -e -p -o .85,.1-d /home/bf-GHT
:0e
{ EXITCODE=75 HOST }
:0
$DEFAULT
}
Then we run the standard bogofilter for the company on the rest
:0fw:filter.lck
|bogofilter -e -p -t
#if bogofilter failed, return mail to MTA queue
:0e
{ EXITCODE=75 HOST }
________________________________________________
we also RBL in our sendmail and we use SpamAssassin as a milter, but we do not
use the Bayesian features of SA.
More information about the Bogofilter
mailing list