Code And Cocktails

Gnus Configuration (2 of N) - Spam Splitting

| Comments

Setting up Splitting

The next thing I felt I needed to set up was spam splitting. I didn’t want obvious spam being dumped into my inbox anymore.

To set up spam splitting you need to be using Fancy Splitting. Then you add (: spam-split) to you fancy split rules. At this point you have something like:

(setq nnmail-split-methods 'nnmail-split-fancy
         nnmail-split-fancy '(| (: spam-split)
                                "mail.misc"))

You also have to call spam-initialize to make it start working.

/However/ one has to do a little more. You have to specify which spam back ends you want to use. Since my ISP runs SpamAssassin I chose to use spam-use-spamassassin-headers. Setting this to t makes the spam package check for the X-Spam-Status: YES header. (There are plenty of choices so check out the doc)

What didn’t work quite right

I also wanted to use Bogofilter so that my local machine could learn to identify stuff that my upstream Spamassassin did not. However I’m not sure if that is working correctly. My Bogofilter database file is still zero size.

To get a spam back end to process spam and ham when you are done reading a group you need to add some group parameters. So I set:

(setq gnus-parameters
       '(("nnfolder.*"
          (spam-contents gnus-group-spam-classification-ham)
          (spam-process (ham spam-use-bogofilter)))
         ("spam.spam"
          (spam-contents gnus-group-spam-classification-spam)
          (spam-process (spam spam-use-bogofilter)))
        ...

But like I said that doesn’t appear to be working. I’m probably just missing something small that is mentioned in the documentation.

What seems to be broken

Before my nuke and pave (and upgrade to emacs v24) I was using BBDB as a whitelist. So if you were not in my BBDB then you went to spam. However with v24 when I try to use BBDB I get an error saying that bbdb-search is undefined. It /is/ defined in bbdb-com.el however so I am not sure what is wrong. I’m going to investigate a bit more and post a question on gmane.emacs.gnus.general and gmane.emacs.gnus.user (maybe also gmane.emacs.bbdb.user).