the bayesian filter integrated into Thunderbird sucks. After some time, it seems to accept most of the mails, like if it was forgetting what it learned.
So I decided to install SpamBayes. It is an official Debian package. Now the question is: how to install it.
Had a look in /usr/share/doc/spambayes, the README.txt.gz.
Firest thing to do : start the pop3 proxy server. It is /usr/bin/sb_server.py.
After that, start http://localhost:8880/ and configure the POP server.
Then, train from the Thunderbird mailboxes. Imported the junk mailbox as spam, the inbox mailbox as ham (=real messages)
Finally, just changed the POP server in Thunderbird to localhost
next, from blog.bartholomew.id.au
# Then from the “Tools“ menu select “Message Filters“ and click “New…“.
# Enter “SpamBayes“ as the “Filter name“.
# From the first dropdown list (defaults to “Subject“) select “Customize“.
# Enter “X-Spambayes-Classification“ as the “New message header“ then click “Add“ and then “OK“.
# Select the “X-Spambayes-Classification“ option from the first dropdown list.
# Select “is“ from the second dropdown list.
# Type “spam“ in the final text box.
# Under “Perform these actions“:
1. Check “Move to folder“ and select your “Junk“ folder from the dropdown list.
2. Check “Set junk status to“ and select “Junk“ from the dropdown list.
# Click “OK“.
# Repeat steps 4 – 12 entering “unsure“ instead of “spam“ in step 10. You may want to specify a different folder in step 11.1 as this is the classification that SpamBayes will give to mail it isn’t sure is spam.
To run the SpamBayes server as a deamon :
copied the script found at http://spambayes.sourceforge.net/unix.html to /etc/init.d/spambayes.
chmod a+x /etc/init.d/spambayes
update-rc.d spambayes defaults
Ok, understood that the hard way: I need to make in /root a .spambayesrc config file, with at least those lines :
[Storage]
persistent_use_database=True
persistent_storage_file=/etc/hammie.db
Otherwise my config, and all the training data, will live only for the duration of the session…