UNIVERSITY of GLASGOW

IT Services
Home > Services A-Z > IT Services > For Staff > Using e-mail > Spam filter service > How the spam filter works

How the spam filter works

The Spam Filter service uses a tool called SpamAssassin. SpamAssassin operations are based on the automatic recognition of characteristics that are present in most spam email messages.

The characteristics are derived from large set of tests that have identified many common spam phrases and tricks that spammers use to mask their real identity. Each test (there are currently around 800) is assigned a pre-defined "score", which indicates its relative strength as a spam-indicator. Below are two examples of the tests applied to each incoming message:

  • An email message that mentions 'a limited time offer' within the body of the email would receive a score of 0.3
  • A subject line contains the word "GUARANTEED" in uppercase receives a score of 2.9
  • An email that claims to originate from Outlook Express, but is not in Microsoft format would also score 2.9

The first test has modest correlation with spam, and is assigned a score of 0.3. The second is a stronger indicator of spam and is scored accordingly. No individual test is sufficient for a message to be rejected as spam. Rather, the individual scores are combined to produce an overall score for each message. The higher the score, the greater the likely hood that a message is spam. The following thresholds are applied: -

  • A score greater than 5 - subject line labeled [SPAM?] and the message is forwarded as normal.
  • A score greater than 8 - message is rejected.

Note that rejected mails are returned to sender, together with an explanation of what has happened. If it was a genuine message, the sender can then modify the message and resend it.

More information about SpamAssassin can be found at http://www.spamassassin.org/tests.html together with a very detailed description of the tests used.