spamassassin & bogofilter
David Relson
relson at osagesoftware.com
Sat Mar 29 00:55:49 CET 2003
Greetings,
Since almost the beginning, the bogofilter FAQ has said "How can I use
SpamAssassin to train Bogofilter? (coming soon)". Today I decided that
it's time to fill in that hole. So I loaded SpamAssassin-2.41 and did some
procmail experimentation (along lines suggested by various posts on this
list). For testing purposes I used the sample-spam.txt and
sample-nonspam.txt files that come with SpamAssassin. At the end of my
experiment, I had 3 test scripts, a procmail recipe, and some execution
times. Here's what I've got:
script #1 - tst.sa.sh - runs spamassassin twice - one time for each test
file - to classify and rewrite it.
script #2 - tst.bf.sh - runs bogofilter four times - once for each test
file to build the wordlists and once for each file to classify and rewrite.
script #2 - tst.pr.sh - runs procmail for each file. The procmail recipe
first runs spamassassin to classify the message, then runs bogofilter to
register the message as spam/non-spam (depending on the results from
spamassassin). The script then runs bogofilter twice in order to classify
and rewrite each of the messages.
In the name science, I used the "time" command to run the 3 scripts to see
how long things took. Here are the results:
tst.sa.sh 6.19user 0.28system 0:06.68elapsed 96%CPU
tst.bf.sh 0.16user 0.06system 0:00.49elapsed 44%CPU
tst.pr.sh 5.63user 0.19system 0:10.29elapsed 56%CPU
As can be seen bogofilter runs faster than does spamassassin. No surprise
there :-)
If you're curious, all files are available at
http://www.osagesoftware.com/bf-sa/.
David
More information about the Bogofilter
mailing list