This page gives an easy, step-by-step guide to set up spam filtering via the SpamAssassin program for users of the UIUC Mathematics Department's Unix Systems (MUSes) network. The set-up provided here is a slightly customized version of the default SpamAssassin configuration. It should be appropriate for nearly all users, with no further customization needed. (If you are interested in such customization, consult the Spam Filtering Page.)
cp /home/users/hildebr/pub/procmail.sample2 .procmailrcWith this step, spam filtering with SpamAssassin is in place. All messages identified as spam by SpamAssassin will be redirected to a folder (file) "spam" inside the "mail" directory. The remaining steps are recommend, but not necessary.
mailx -s "non-spam" user < /home/users/hildebr/pub/nonspam.txt mailx -s "spam" user < /home/users/hildebr/pub/spam.txt(Note that each of these commands must be on a single line; depending on your browser settings, you may see the commands wrapped onto two lines.) If you now access your email as usual, the first (non spam) message should appear in your message index as usual, but the second (spam) message should not show up. Instead, there should be file "spam" inside the "mail" directory (this file is the "spam folder") containing this message. If the non-spam message does not show up, something went wrong, and you should delete the .procmailrc file to avoid losing any email. Deleting the .procmailrc file (or moving this file to a different location) effectively turns off spam filtering.
alias checkspam 'pine -f $HOME/mail/spam'(Note the two forward ticks enclosing the argument of "checkspam".) To activate and test this alias, log out and log back in or read in the .cshrc file explicitly with the following command:
source $HOME/.cshrcIf you get an error message, the alias command may have been improperly entered. Open the .cshrc file with an editor and fix any problems you notice (in particular, make sure the quotes are present and in the right place), or remove the "alias checkspam" line. If there are no error messages at this stage, the alias should work, and the simple command checkspam should fire up the mail program you specified and display an index of all messages that have accumulated in the spam folder.
The "checkspam" program is mainly intended to check for any "false positives" that may have improperly been identified as spam. You need not do anything with the spam messages. In fact, you can simply let the spam folder accumulate, and delete the entire folder (the file "spam" inside the "mail" directory) when it gets too large (after having dealt with any false positives).
# whitelist_from ...Edit this line by removing the hash mark (#) and entering any addresses you want to "whitelist", separated by spaces. I recommend the following:
whitelist_from *.edu *.ac.uk *.orgThis will whitelist any academic addresses in the US and UK, as well as "org" addresses, such as ams.org, or maa.org. You can always add addresses at a later point. To test the whitelist, send yourself again a sample spam message as in Step 4. This time, the message should appear within the regular mail, since the sender address (i.e., your address) is in the whitelist as it is of the form *.edu.
Last update: Thu 08 Jan 2004 08:31:09 AM CST A.J. Hildebrand