February 14, 2012
 
 
RSSRSS feed

Organizing Your Desktop Communications - page 2

Using SpamAssassin With KMail

  • March 7, 2005
  • By Carla Schroder

KMail supports filtering mail with SpamAssassin. (This howto is based on KMail 1.7.2 and SpamAssassin version 2.64.) It also supports Bogofilter, Annoyance-Filter, and SpamBayes. Additionally, it recognizes spam headers inserted by GMX, Germany's largest free email provider. This can be a bit confusing when you run the anti-spam wizard- it says "GMX spam filter (found on this system)," which sounds as though it is something you have installed. It isn't, so don't beat yourself up looking for it. If you are not a GMX customer, ignore it. (See this bug report for more information.)

Your local KDE help file may not be current; check out The Anti-Spam Wizard to see the latest version.

Setting this up is as easy as falling over. You can configure it for automatic operation, or for manual filtering so you can "train" SpamAssassin. This is how to set up manual spam classification:

  1. Have both KMail and SpamAssassin installed
  2. In KMail, go to Tools -> Anti-Spam Wizard
  3. It will scan for installed anti-spam programs. When it is finished, click Next
  4. Click the checkbox for SpamAssassin and hit Next
  5. Click the checkbox for Classify Messages Manually As Spam
And you're done. Two new icons will appear on the toolbar: one for Ham, and one for Spam. Use these to classify new messages for "training" SpamAssassin. The Spam button also marks them as read and sends them to the Trash folder. It doesn't get any easier. After you have run a few hundred messages through the Ham/Spam mill, you can try letting it run automatically:
  1. Tools -> Anti-Spam Wizard
  2. Click Next after the program scan
  3. Click the checkbox for SpamAssassin and hit Next
  4. Click the checkboxes for Classify Messages Using the Anti-Spam Tools, Move Detected Spam Messages To The Selected Folder, and Additionally, Mark Detected Spam Messages As Read
Leave your manual Ham and Spam filters in place, as you will want them for periodic tuneups. man sa-learn advises you to use at least a thousand hams and a thousand spams for training. It is best to train on fresh messages as they come in. It sounds like a lot of work, but if your email volume is typical, it won't take more than a couple of weeks. Doing your own training is very effective and you will see it pay off quickly.

Run sa-learn --dump to see what sort of goodies your SpamAssassin database is collecting.

Sitemap | Contact Us