Spam Filter

From IT Service Wiki
Revision as of 14:56, 15 July 2008 by Thomas (talk | contribs)
Jump to: navigation, search

The spam filter must be activated on per users basis. The system administrator is not allowed to manipulate the users mail until he is adviced to.

We have predefined filter sets which you can include into your .procmailrc. Open or create a file .procmailrc in the root of you home directory enter the following line:

 INCLUDERC=FILENAME

FILENAME can be

/etc/procmailrc.junkfilter/mark 
Only analyses and marks the mail (in the header). The mark are spam points, which is the basis for sorting in the following filter rules
/etc/procmailrc.junkfilter/keep-all  
moves the junk to subfolders, but does not delete it. A mail need to get 5 spam points to be moved to the subfolder "Junk". Mails with more then 8 points are moved to the Folder "Definitely" which is a subfolder of "Junk". This rule set is not recommended, because in the past many users were not subscribed to "Junk/Definitely" never noticed that ten thousands of spam mail are messing up their home. If you really want this, please check if you are subscribed to both folders and regularly check the contents and delete.
/etc/procmailrc.junkfilter/purge-high
Junk Mails with 5 to 8 points are moved to "Junk". Junk with more the 8 points is deleted silently, instead of stored in the "Definitely" Folder. This is the recommended setting, because no correct mail gets more than 8 points. Even more than 5 for a correct mail does realy seldom. You still have to delete spam from the "Junk"-Folder.
/etc/procmailrc.junkfilter/purge-all 
Every suspected spam is delete (more than 5 points). This rule set is recommended for accounts which are rarely used or get massiv spam.

It is up to you, we are not responsible if you miss an important Mail!

Further options

Log file

If you like to see what's going an, you have the option to log the procmail activities. Simply add the following lines at the head of your .procmailrc:

 LOGFILE = $HOME/procmail.log
 LOGABSTRACT = "all"

And don't forget to rotate the log file from time to time.

Adjusting Spam Limit

By default a mail is marked as spam if it gets 5 or more spam points. If you get lots of spam and the Bayesian learning filter doesn't catch them all, you can degrease the spam limit.

Open the file ".spamassassin/user_prefs" in your editor, remove the comment sign (#) in front of the statement "requiered_score" and adjust the values. Less then 2 is not recommended and can lead in a significant number of false positives.