Email Spam Filtering
 
 

Topics:

Introduction

Like it or not, unsolicited commercial email (spam) is a fact of life these days. To help combat this problem you can use our spam filtering tools to detect this unwanted email and make dealing with it easier.

BMRC Setup

Your BMRC email account can use the SpamAssassin software package for detection of spam. The basic idea is that SpamAssassin will analyze all your incoming email messages. Messages considered to be spam by the software will be marked as such. You can then configure your email client to send these marked messages to an alternate folder that you check less frequently than your regular inbox. With most email clients it is quite easy to save the messages you actually want from this folder, then delete the rest.
Please note that SpamAssassin does no filtering or deletion of messages on its own. It just adds information to incoming messages based upon its analysis.

Using SpamAssassin

Using SpamAssassin for BMRC email is an "opt-in" process for now. This means that no spam detection will be done unless you set it up. Here's how to do that:

SpamAssassin Setup

In your home directory, create a file called .procmailrc containing this code:

:0fw
| /usr/local/bin/spamassassin

Now any email delivered to you will be analyzed by SpamAssassin. If you need assistance getting this to work please ask me.

Email Client Filtering

Once SpamAssassin is running on your incoming email, you can set up your email client to filter newly received mail based on its results.
NOTE: the EECS department has recently set up SpamAssassin analysis for email messages passing through their servers. Their documentation should prove useful to many of you, as it includes methods for setting up email filtering rules for a number of client programs.
To filter out spam-tagged messages, I suggest you use a message filter based on the "X-Spam-Status" header. Messages considered spam will have this header with "Yes" as the first word. Another method is to use the "X-Spam-Level" header; the value will be a number of asterisks (*) equal to the spam "points" for the message. The default number of points for a message to be considered spam is 5.
I strongly recommend that you filter spam-tagged messages into an alternate folder for later review and not have them immediately deleted. This approach will prevent you from losing any legitimate email that was incorrectly marked as spam.

Setting Personal Preferences

You can customize the way SpamAssassin analyzes and tags your incoming email by modifying the ~/.spamassassin/user_prefs file to include some options. See the SpamAssassin configuration documentation for more information on this. The options you will most likely want to use include:

  • whitelist
  • blacklist
  • subject_tag
  • required_hits