UserPreferences

GentooClientImapFilter


Note: This wiki is now frozen; you can no longer edit it, and no interactive features work.

1. Gentoo Installation and Setup

This is how to setup SpamBayes on a [WWW]Gentoo Linux machine with client access to an IMAP account.

  1. Create four folders on your IMAP account called

  2. spam dump

    for SpamBayes to dump spam into,

    spam for training

    for spam that you will use to train SpamBayes to recognize spam

    possible spam

    for messages that might be spam but SpamBayes is unsure about and

    ham for training

    for a selection of messages that you have received which are not spam.

  3. Collect spam! Copy spam messages from your inbox into spam for training folder for a day or so.

  4. Place a copy of some good messages into the ham for training folder. [Note it is considered good practice to have roughly equal amounts of spam and ham for SpamBayes to train on.]

  5. [WWW]Python should already be installed because Portage relies on [WWW]Python.

  6. Download the ebuild for [WWW]SpamBayes [WWW]1.0.1 (I have had problem with later builds of SpamBayes. Later versions may work for you.

  7. Create a local portage repository /usr/local/portage/mail-filter/spambayes

  8. Make sure that your make.conf points to /usr/local/portage

  9. Add the Spambayes ebuild to your local portage spambayer folder

  10. Also create a files directory and download the following files

    1. bayescustomize.ini (copy bayescustomize_imap.ini to bayescustomize.ini)

    2. bayescustomize_imap.ini

    3. spambayesimap.rc

    4. spambayespop3proxy.rc (Not necessary, but is referenced in the ebuild and will cause emerge to fail if file is missing)

  11. Run emerge spambayes

  12. Run ebuild spambayes-1.0.1.ebuild digest to build the digest to create the digest for emerge

  13. Run emerge spambayes

  14. Setup rules for SpamBayes

  15. Add SpamBayes to your default init scipts

    rc-update add spambayesimap default

2. Running SpamBayes

Do not do this until you have collected spam and ham for training. Otherwise, you will be disappointed by the results of SpamBayes.
  1. Start the spamfilter

    /etc/init.d/spambayesimap start

    1. Train SpamBayes to recogise the differences between your good mail and your spam.

    2. Classify the messages in your INBOX, move spam to the spam dump folder and move messages that it cannnot easily classify into good mail or spam into the possible spam folder.

  2. This will happen every 30 minutes.

  3. Use your e-mail client as normal. It seems best to turn off checking for e-mail on a regular basis. Just use the Check button every now and then.

  4. Every now and then, sort the possible spam folder by moving messages that you can see are spam into the spam for training folder and the good ones into ham for training. You may also want to move the good ones back into your INBOX so that you can deal with them as ordinary messages.

  5. You can look at the 'spam dump' folder to see if there are any good messages wrongly classified but after a couple of days you will trust SpamBayes not to do this. Delete and expunge messages in this folder.

So that is all there is to it.

My only complaint is that I can't seem to find the syntax for the bayescustomize.ini file anywere. The web interface is nice for getting started and for checking the status of the filtered mail, but I would like to do things like kill the automatic web browser launching. launch_browser: False doesn't seem to work very well. I used it because I had found it in the pop3proxy ini file that was available with Gentoo.