Filtering Mail for Spam
All mail arriving at Steward from outside the department will be passed
through a set
of filters which attempt to classify it as spam or non-spam (also known
as "ham").
Once the classification has been made, special headers are inserted
into the mail message, and
the mail is delivered as usual. Note that all mail will
continue to be delivered.
You are responsible for filtering the incoming mail and doing with it
what you will.
The computer support group will not make decisions about the content of
your mail
or what to do with it other than to add these spam classification
headers.
The only exception to this rule is when mail is found to be infected by
a known virus. In
this case, the virus is removed from the mail (or attachments) and the
mail is delivered
along with a notification of what was removed.
For the
forseeable future, we do not recommend simply throwing away messages
filed
as spam. We
expect to be trying new filters from time to time, and while we test
these
filters
extensively before we add them to the system, we cannot be sure that
they
always lead to
the desired result. Check your spam regularly,
just in case...
In our initial attempt at filtering, four headers will be added to each
message.
For example, a recent spam message produced:
X-MailScanner: Found to be clean
X-MailScanner-Information: Please contact the ISP
for more information
X-MailScanner-SpamCheck: spam, SpamAssassin
(score=7.2, required 5, SUBJ_HAS_Q_MARK,
PLING, GUARANTEE, FULL_REFUND,
DOUBLE_CAPSWORD, CLICK_BELOW)
sssssss
The first header indicates that the message was not found to be
infected by a virus.
The third header gives an overall score for "spamness". Generally, a
score of 5 or greater
indicates a high probability of being spam. It then gives some
indication of why the message
was classified as spam.
The last header is the one to use for filtering spam from your email.
It gives the score as a string
of "s"-es. We recommend you set up your mail filtering to search for a
string of at least five
"s"-es in this header and then take some action, such as moving the
message to a "PutativeSpam"
folder. Instructions on how to do this with various mail-reading
programs are given below. You
may wish to alter your "spam threshold" as you gain experience with
filtering. At present, the
filters we employ seem to remove about 85% of spam. We have a few more
filters yet to
implement, and hope to push this number into the 90% range soon.
In addition, mail with a score of more than five "s"-es will have
"{Spam?}" inserted at
the beginning of the subject line. In this case, the mail is delivered
with the subject:
{Spam?} Eat pizza, watch TV ... AND LOSE 22 POUNDS!
<brocktony@msn.com>
Instructions for Various Mail Readers
In the following, you will be instructed to move all spam to another
mail folder. Most mail readers
provide an option for throwing away mail. We strongly recommend that you do not
throw away
your spam, at least not for
a few months until you are confident that the classifier is doing what
you want. Periodically check the mail classified as spam, and notify
the computer support group
if you find mail which has been erroneously classified as spam. Once
you have done this, you can
bulk delete the entire contents of the spam folder, confident it will
soon fill up again.
Here are instructions for setting up your mail reader for filtering
spam based on
the special headers introduced above.
Webmail:
(When webmail is introduced later this month, instructions on filtering
will be provided here)
Unix Mail Readers:
Mozilla, Netscape 7, and Netscape 4.7.8:
- Choose Message Filters
from the Tools menu (for
Netscape 4, choose from the Edit
menu):
- Click the New
button on the "Message Filters" window which appears
- Give the filter a name (such as Spam
Filter) in the "Filter Rules" window which appears.
- Click the down arrow next to Subject,
and choose Customize.
- Type in the name of the header to check, X-so-MailScanner-SpamScore (without the
colon)
- Click Add, and OK
- Click the down arrow next to Subjectagain,
and select the new header you just added
- In the empty box following contains,
type in five "s"-es: sssss
- Below, select "New folder"
- Type in the name of the mail folder you want your spam moved to
(e.g. PutativeSpam).
- Click on Click here to select
- Move to your email address, and select choose this for the parent
- Click OK
- Click OK in the "Filter
Rules" window
- Close the "Message Filters" window.
All mail recieved with a spam score of five or above will now be
automatically moved to
the folder you created (e.g. PutativeSpam). You can use this filter to
do other mail manipulations
as well, such as moving all mail from a given address to a certain
folder, etc.
Pine:
(Press the boldfaced characters to generate actions)
- If you are not there, go to the Main
screen
- From there, go to Setup->Rules->Filter
- Add a rule.
- Initially, the "Nickname" field should be highlighted.
Add a value at "Nickname",
e.g. Spam Filter.
- Select (*) the "Specific"
choice under "Current Folder Type"
- Use Change, Add, or Delete to make "Folder List" read
INBOX.
- Press X to add a new
header to filter on, entering X-so-MailScanner-SpamScore
- The "X-so-MailScanner-SpamScore" header should now be highlighted
under
"FILTERED MESSAGE CONDITIONS BEGIN HERE" Use Add value,
Change value, or Delete
value to make the value field contain five "s"-es: sssss
- Scroll down to the "ACTIONS BEGIN HERE" section.
Make sure the "Filter Action" option is set to "Move".
- Select the "Folder List" item in that section, and set
it to the name of the
mail folder you want your spam moved to (e.g. PutativeSpam).
- Exit setup and press Y to commit the change.
You may be asked to create the PutativeSpam folder; accept that change
if this happens.
- Exit setup again, and
press Y to commit the change.
Sun MailTool, Elm, and plain old
Mail:
The Sun MailTool, Elm, and plain old UNIX Mail cannot do mail
filtering. We suggest that you
switch to using Netscape/Mozilla or webmail as your mail reader. If you must continue to use
MailTool or Mail (why we cannot imagine), see Alan, Jeff, or Neal for
instructions on how to set
up a work-around mail filtering script using procmail.
Windows Mail Readers:
Eudora:
- From the main Eudora window, select the drop down menu Special,
then select Make Filter.
- Click Add Details.
- Click New to make a new filter. Notice the Untitled
name in the left of your screen.
Now check the box next to Incoming under the Match category.
- In the Header drop down menu, select <Any Headers>.
- The next drop down menu should read contains. In the
empty box next to it,
enter X-so-MailScanner-SpamScore
- You can safely leave the next menu as ignore. (This part
is where you can daisy-chain
filters one after another.)
- Under the Action section, the first drop down menu should
read Transfer To,
then click the button immediately across from it.
- When you click the button, it will present you with a list of
existing mailboxes
and a New.. selection.
- Click New and a window
will pop up asking you to name a new mailbox.
- Enter the name of the folder to which you would like mail
classified as spam to be moved
(for example PutativeSpam)
- Click OK.
- Close the "Filters" window, and click Yes to confirm.
Outlook:
Note that this is not Outlook Express (see below). Note also that
Outlook has had so many
security vulnerabilities in the past that we cannot recommend its use;
Outlook Express is
safer.
- Go to Tools->Rules Wizard...
- Click 'New...' (on the
top right)
- Choose 'Check messages when they
arrive'
- Click 'Next'.
- Check 'With specific words in the message header'.
- Click on 'specific words'.
- Type in: X-so-MailScanner-SpamScore:
sssss (one space between the : and the first s)
- Click 'Ok'.
- Click 'Next'.
- Check 'Move it to the specified folder'.
- Click on 'specified'.
- Create a new folder to which you would like mail classified as
spam to be moved (e.g. PutativeSpam)
- Click 'Ok'.
- Click 'Next'.
- Click 'Next'. (Again,
unless you want to add exceptions.)
- Give the rule a name. (The default is what you typed for specific
words above.)
- Check 'Turn on this rule'.
(You may or may not want to check 'Run
this rule on my Inbox now'.)
- Click 'Finish'.
Outlook Express:
Outlook Express cannot filter on mail headers. Thus, you will not be
able to customize
your mail filtering with this tool. If you are content to use the
computer support group's
spam cutoff score of five, you can create a filter based on the
"{Spam?}" entry in an
incoming mail's Subject header as follows:
- With Outlook Express open, move to the Tools menu and select the
Message Rules option, then Mail
- If the "New Mail Rules"
window does not appear, click on the New
button in the upper right of the "Message Rules" window;
the "New Mail Rules" window is displayed.
- Respond to 1.) Select the
Conditions for your rule by checking the box next
to "Where Subject line contains specific words."
- Respond to 2.) Select the
Actions for your rule by checking the box adjacent to "Move it to
the specified folder".
- Respond to
3.) Rule Description (Click on an underlined value to edit it) by
clicking
the highlighted words "contains specific words"; the "Type Specific
Words" window will appear.
- Type {Spam?} and click the Add button and the OK button
- Click on the highlighted word "specified"; the "Move" window will
appear.
- Choose a folder to which you would like mail classified as spam
to be moved, or create a new one, then click OK.
- Respond to 4.) Name of the Rule by
highlighting the words "New Mail Rule #1" and typing Spam Filter.
Click the OK button.
Mac OS X Mail Readers:
- In the menu bar click Mailbox thenNew Mailbox and create the mailbox to
which you would like mail classified as spam to be moved (e.g. PutativeSpam)
- In the menu bar click Mail
then Preferences...
- Click Rules then Create Rule
- Add a description of the rule, then click the From Criteria then click Expert...
- In the "Header:" field enter X-so-MailScanner-SpamScore,
click Add Header and OK
- Now click From and select X-so-MailScanner-SpamScore
- Select Contains in the
next box and enter yes in the
third "Critera" box.
- In the "Action" section, check 'Transfer to mailbox' and select
the desired mailbox. click OK
- Adjust the rule priorities if you want and dismiss the "Mail
Preferences" dialog box.