Goodbye Spam

- - posted in Ancient Archives

We’re getting about 40 spam email messages a day now. At work I’ve set up the excellent and free MailScanner to mark spam and make email messages safe, but that’s a little excessive for my home network. I don’t use Windows so there’s very little danger from viruses at present, and I don’t use Sendmail which MailScanner requires.

Instead I’ve just used SpamAssassin and a very simple procmail script. A quick summary of the process is below. Now I don’t need to weed out spam from my inbox every evening.

This is Unix only, so Windows users needn’t bother reading any more, although there are commercial, windows-compatible versions of SpamAssassin.

If your mail system already uses procmail (for example, Mandrake and Redhat Linux using Sendmail or Postfix) all you need to do is:

  1. Install SpamAssassin. Just download it, unpack the tar, and as root type

perl Makefile.PL ; make ; make test ; make install

  1. Edit your $HOME/.procmailrc script to include this at the top:

:0fw | /usr/bin/spamassassin

  1. Add a filter to your email program to move mail containing the header

X-Spam-Status: Yes

into a special spam folder. That way you can check for mistakes occassionally.

There are many more options and settings to tune SpamAssassin and add more features, but that’s all you need. If in doubt, read the documentation.