Mailfilter

This page describes the mailfilter. If your mail got blocked (or if you are a user at our department and you didn't get an email you are awaiting), please have a look at our website describing the mailblocks.


To help user to filter spam (UBE, UCE) from their mail we use some software to analyze the incoming mails.
This software does not block the mail if it is recogniced as spam. It only marks them as such. The header explain why it was recognized as spam.

Currently we are using SpamAssassin and some newer ruleset from http://files.grayonline.id.au/.

At the moment there is no generally filtering. You can add an entry to your procmail file to use the filter mechanism.


Header

SpamAssassin adds some email header to filter the mails. If the email was recognized as spam it creates a new email (which explains the spam recognition and the score of the tests which apply) and adds the original email as attachment. (So you can save the attachment to get the original email.)

In case of spam, the header look like

X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.0.1-dbai_vexpert_20050104_01 
        (2004-10-22) on vexpert.dbai.tuwien.ac.at
X-Spam-Status: Yes, score=16.7 required=5.0 tests=BAYES_99,BODY_GAPPY_TEXT,
        BODY_LUMP_SUM_PAYOUT,MILLION_USD,NIGERIAN_BODY1,NIGERIAN_BODY2,
        PLING_PLING,SUBJ_ALL_CAPS,UNCLAIMED_MONEY,US_DOLLARS_3 autolearn=no 
        version=3.0.1-dbai_vexpert_20050104_01
X-Spam-Level: ****************
and in the other case it looks like
X-Spam-Checker-Version: SpamAssassin 3.0.1-dbai_vexpert_20050104_01 
        (2004-10-22) on vexpert.dbai.tuwien.ac.at
X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_20,NA_DOLLARS,
        NO_REAL_NAME,UNDISC_RECIPS autolearn=no 
        version=3.0.1-dbai_vexpert_20050104_01
X-Spam-Level: *
The line "X-Spam-Flag: YES" tells you that the email was marked as spam.
The line "X-Spam-Checker-Version" tells you the version of the software and the date of the configuration.
The line "X-Spam-Status" tells you the spam status (Yes/No), the score and which tests applied to the email. Additionally the version and autolearn status are displayed.
The line "X-Spam-Level" shows you in ASCII graphics the level of the spam. For each point of the score one character appears (in the default configuration the asterisk will be used). This might be used to filter different score levels in different mailboxes using the procmail rules.

The tests in the standard configuration are listed at the SpamAssassin site. The tests from the additional rulesets are not listed, but the score is displayed in the mail (generated by SpamAssassin) if the original mail (which is attached to the mail) is recognized as spam.


procmail

The usage of SpamAssassin in procmail rules is explained in the Wiki.

A typical ruleset would look like this (in this case the user preferences in your home directory are used):



INCLUDERC=/sw/SpamAssassin/dbai/procmailrc-include

:0
* ^X-Spam-Status: Yes
{
  :0
  * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  spam

  :0
  possible-spam
}
This would filter everything with a score of 15 or higher to the mailbox named spam and every other mail which is marked as spam to the mailbox named possible-spam.


postmaster@dbai.tuwien.ac.at
Last modified: $Date: 2015/12/19 07:54:30 $