University of Connecticut College of Liberal Arts and Sciences
Department of Mathematics
HOME SEARCH ABOUT US CONTACT INFO PEOPLE NEWS   GIVING WEB MAIL PRINTABLE VERSION
E-mail Spam Filter

SpamAssasin

All e-mail sent to the Math Department is now filtered by a program called SpamAssassin.

The way the spam filter works is that each incoming e-mail is examined by the filter which identifies individual characteristics common to spam (unsolicited marketing e-mail) and assigns each of them a point based rating based on how "spammy" that characteristic is. Once a certain amount of points is reached, action is taken by the filter.

Our current set-up is that once a message is considered spam by the filter the subject line is then relabeled "[***SPAM*** hits / allowed]"

A key point to remember is that if you sign-up for any product updates and/or newsletters from commercial companies, and you wish to receive these unmarked as spam, you have two options.


Opting Out of SpamAssasin

If you wish to stop having SpamAssassin relabel your e-mail do the following:

  1. Using your favorite editor (emacs, vi, pico, etc.) open up
    .spamassassin/user_prefs
    in your home directory
  2. Find the line that says:
    # required_hits    5
  3. Change it to:
    required_hits    100
    Do not forget to remove the pound sign at the beginning of the line.
  4. Save the changes to the file.


Creating a Personal "Whitelist"

To ensure that SpamAssassin does not label e-mails from specific people that you consider legitimate e-mail as spam do the following:

  1. Using your favorite editor (emacs, vi, pico, etc.) open up
    .spamassassin/user_prefs
    in your home directory
  2. Find the lines that say:
    # Whitelist and blacklist addresses are now file-glob-style patterns, so
    # "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work.
    # whitelist_from someone@somewhere.com
  3. Under these lines add a line such as the following for each person you wish to receive e-mail from unmarked by SpamAssassin:
    whitelist_from    myfriend@aplace.math.edu
    where "mufriend@aplace.math.edu" should be the e-mail address from which you would like to receive messages without interference from SpamAssasin.
  4. Save the changes to the file.

Creating a Personal "Blacklist"

To ensure that SpamAssassin does not label e-mails from specific people that you consider legitimate e-mail as spam do the following:

  1. Using your favorite editor (emacs, vi, pico, etc.) open up
    .spamassassin/user_prefs
    in your home directory
  2. Find the lines that say:
    # Whitelist and blacklist addresses are now file-glob-style patterns, so
    # "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work.
    # whitelist_from someone@somewhere.com
  3. Under these lines and any lines filled with people on your whitelist, add a line such as the following for each e-mail address that you want SpamAssasin to mark as "SPAM":
    blacklisst_from    spammer@irritating.com
    where "spammer@irritating.com" should be a real e-mail address that you want marked "SPAM".
  4. Save the changes to the file.

Troubleshooting

If you receive a large number of e-mails from different e-mail addresses that are similar in nature and contain similar phrases we may be able to customize SpamAssassin to block these, please forward them to spam@math.uconn.edu.


Redirecting Tagged Messages To Another Mailbox

Below are instructions on how to have e-mails marked as spam by the spam filter automatically be sent to a separate mailbox for you to view at your leisure.

Note that many email readers (KMail, Netscape, Eudora, Thunderbird, etc) allow you to setup different mailboxes. There are several ways to distinguish the Spam caught by Spamassassin. One is that there is the string "[***SPAM***]" in the header. Another is the header:
X-Spam-Flag: YES
There is also a header with SPAM and a string of *'s.

For WEBMAIL, emacs rmail, mail, elm and mutt

  1. Using your favorite editor (emacs, vi, pico, etc.) edit the file
    .procmailrc
    in your home directory.
  2. At or near the bottom you might see the lines:
    :0fw
    | /usr/bin/spamc
    If you do not see these lines, add them.
  3. After these lines add the following:
    MAILDIR=$HOME/Mail
    :0
    * ^X-Spam-Flag: YES
    myspamfile
    This will direct the spam to the file "myspamfile" in your Mail folder, where you can look at it (or not) as you wish. You can of course change the name to anything else.
  4. Save the changes to your file.
  5. Mail marked as spam can be read with the -f Mail/myspamfile flag to your mail program or by setting the appropriate preferences.
Remark: If you are already using procmail, all you have to do is add the three-line rule above to your .procmailrc. You can position it where you like to allow other rules to apply to suspected spam first.

For Netscape Users:

  1. In the pull-down bar at the top of your Netscape window, go to "Edit: Message Filters". A new window will open.
  2. Click "New". Click "Advanced". A new window will open.
  3. Enter "X-Spam", click "Add", click "OK". The latest new window will close.
  4. In the pull-down list, select "X-Spam-Flag".
  5. In the "contains" box, enter "X-Spam-Flag: YES".
  6. In the "Perform this action" pull-down list, select "move to folder".
  7. Click "new folder" and create a spam folder. It should then be selected in the pull-down list of your folders.
  8. Click OK.
  9. The next time you check your mail, check to see if any messages were automatically filtered into your spam folder!
If you use Mozilla, the steps you take are similar to those above except you will find the Message Filters under the Tools Menu.


Sources

 
UConn The Web People
  
ACTUARIAL SCIENCE MATHEMATICS FINANCIAL MATHEMATICS