[My work]

Philip Kendall - Spam Filtering

Note: this page is now obsolete and the instructions listed here will not work. Fortunately, much the same is now installed system-wide at the IoA. See the User Guide for details.

Note: this is a completely unsupported service. If you can't get it to work, if it doesn't work, if you lose mail, if it causes Cthulhu to eat your first-born child or anything else goes wrong, this is your problem. Don't expect me, helpdesk or anybody else to fix your mess for you.

Spam is a problem, and one which currently (Jan 2003) appears to be on the increase. Unfortunately, neither the IoA nor the Cambridge mail systems have any form of spam filtering installed (which is a perfectly reasonable design decision), so people at the IoA are subjected to the full force of the evil scum who spam us.

What can be done about this? There are various spam filtering systems available, of which one is SpamAssassin. However, these aren't necessarily trivial to set up. This is a brief step-by-step guide which may allow you to get SpamAssassin working at the IoA.

  1. Read and understand the disclaimer at the top of the page (it isn't necessary to understand who Cthulhu is).
  2. If you've done that, create a '.procmailrc' file in your home directory, with the following contents:

    MAILDIR="$HOME/mail"
    
    :0fw
    | /usr/local/bin/spamassassin
    
    :0:
    * ^X-Spam-Status: Yes
    spam
    
  3. Create the following '.forward' file in your home directory (with the quotes):

    "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #<your user name here>"
  4. Send yourself a mail. If it doesn't show up in a minute or so, delete the '.forward' file (or it's highly likely you won't be able to receive any mail at all). Things aren't working. If you can work out what you've done wrong, fix it. If you can't, see the disclaimer at the top of the page.
  5. If your test mail showed up, congratulations. It should now be the case that most of your spam no longer shows up in your inbox, but instead arrives in your 'spam' mailbox. It's probably worth checking this occasionally to check that SpamAssassin hasn't accidently classifed something non-spam as spam, but it's generally pretty good about this.

Any problems? Read the disclaimer...


Valid XHTML 1.0! Valid CSS!