[bogofilter] bogfiltering for the whole site

Paul Tomblin ptomblin at xcski.com
Tue Sep 10 16:38:59 CEST 2002


I've had a couple of different ideas for bogofiltering for the 10 or 15
people who use my site for their email, plus the mailing lists.

1. Use a single bogofilter directory for everybody.  The drawback of this
is that some people's mail might look like other people's spam.  For
instance, my daughters get a lot of HTML mail, but 99.999% of the HTML
mail I get is spam.  But if I do this, I could train it with my huge
collection of spam and non-spam that I've been saving for a couple of
weeks now.

2. Use spamassassin and mutt macros to train bogofilter.  In this method,
I'd set up macros in /etc/Muttrc like so:
macro index d "<enter-command>unset wait_key\n<pipe-entry>bogofilter -h\n<delete-message>\n<enter-command>set wait_key\n" 
macro pager d "<enter-command>unset wait_key\n<pipe-entry>bogofilter -h\n<delete-message>\n<enter-command>set wait_key\n" 
macro index \ed "<enter-command>unset wait_key\n<pipe-entry>bogofilter -S\n<delete-message>\n<enter-command>set wait_key\n" 
macro pager \ed "<enter-command>unset wait_key\n<pipe-entry>bogofilter -S\n<delete-message>\n<enter-command>set wait_key\n" 
When you see spam, you hit <esc>d, and when you see non-spam you hit d.
Also, mail is filtered through the followign procmail recipe:

:0HB
* ? bogofilter
{
   :0HBc:bogofilter.lock
   | bogofilter -s

   :0
   Mail/bogofilter
}

:0fw
| spamassassin -P -a

:0
* ^X-Spam-Status: Yes
{
   :0HBc:bogofilter.lock
   | bogofilter -s

   :0
   Mail/caughtspam
}

:0EHBc:bogofilter.lock
| bogofilter -h

This way anything that bogofilter misses, but spamassassin classifies as
spam, gets sent to train bogofilter.  Bogofilter should get better over
time, meaning less mail being sent to spamassassin which is relatively
slow.

-- 
Paul Tomblin <ptomblin at xcski.com>, not speaking for anybody
"He passed away during an important civic function held in his honor when the
platform upon which he was standing collapsed." "I thought he was hanged?"
"That's what I said, isn't it?"




More information about the Bogofilter mailing list