Spamassassin (see www.spamassassin.org) is an email screening program which applies a number of heuristic rules to incoming email messages to attempt to determine if they are spam or not. The rules generate a "hit" count for each message, and the higher the hit count, the more likely it is that the message is spam. The "hit level" which causes a message to be marked as spam can be adjusted by each user.
If a message is determined to be spam, it is encapsulated in an attachment and flagged with headers which identify it as spam. The purpose of this encapsulation is to prevent the message from being immediately viewed, an action which with some email programs can result in the spammer being notified that their email has been read. This encapsulation feature can be turned off, and it is also possible to have Spamassassin flag spam by adding the string "****SPAM****" to the "Subject:" line.
To use Spamassassin, do the following:
cp /usr/local/lib/spamassassin/procmailrc ~/.procmailrcThis file contains the following three lines:
:0fw: spamassassin.lock * < 256000 | /usr/local/perl5/bin/spamc
cp /usr/local/lib/spamassassin/forward ~/.forwardThis file contains the following line:
| /usr/local/bin/procmail
IMPORTANT WARNING! Immediately after creating the ".procmailrc" and ".forward" files, send yourself an email message. If you don't receive this message within 15 seconds, DELETE THE ".forward" FILE. Something is wrong, and your mail is not being delivered correctly. A typographical error is the most likely explanation, but check with one of the computer staff if you cannot find the problem.
Once Spamassassin is activated, your email messages will have some additional header lines. (Depending upon what email program you are using, you may need to invoke a "verbose headers" option to see these.)
You may want to have messages which have been marked as spam automatically moved to a special folder for later review, so that they don't clutter your inbox. NOTE: This option is not available to users who use the POP protocol to download email to a personal computer. To activate automatic filtering, add the following lines to the end of the ".procmailrc" file you created:
:0: * ^X-Spam-Flag: YES MAILDIRECTORY/SPAMFOLDERYou can copy these from the file "/usr/local/lib/spamassassin/spamfolder".
Replace "MAILDIRECTORY" with the name of the directory where your email folders are stored, and "SPAMFOLDER" with the name of the folder which you wish to use for mail flagged as spam. "MAILDIRECTORY" should be the name of a sub-directory in your home directory. Just use the name of the sub-directory, not the complete file specification.
After modifying ".procmailrc", it is always a good idea to send yourself a test message, to make certain mail is still being delivered correctly.
Remember that Spamassassin is not perfect, and there is a small but non-zero chance that it will classify a legitimate email as spam. Thus, you should review the messages in SPAMFOLDER before deleting them.
Documentation on Spamassassin "user_prefs", HTML format
Documentation on Spamassassin "user_prefs", PS format
Some common options:
:0c * !^X-Spam-Flag: YES |/usr/bin/vacation USERNAMEYou can copy these from the file "/usr/local/lib/spamassassin/vacation".
Replace "USERNAME" with your Sun username. These three lines should be placed immediately following the "| /usr/local/perl5/bin/spamc" line in the ".procmailrc" file.
This will invoke the vacation program only for email which is not flagged as spam by Spamassassin.