SpamAssassin configuration

SpamAssassin is invoked from Procmail, to analyze the content of each email, and insert headers to summarize the analysis with a number of keywords, corresponding to a certain "score". If the sum of all these scores are above a certain level, the message is flagged with the word "Yes" in the X-Spam-Status: header.

You may then use the content of the X-Spam-Status: header in a procmail recipe to decide if the mail should go into your default inbox, be stored in a low-priority folder, or written to /dev/null to discard it completely.

You can change the level that triggers the Yes-flag by changing the value assigned to the "required_hits" keyword, in a file named .spamAssassin/user_prefs (note the leading dot).
If you don't agree with some of the default scores that SpamAssassin uses, you can assign any value you choose by adding lines like:

score TEST_NAME x.yz

where TEST_NAME is a symbolic name from the X-Spam-Status: header, and x.yz are numeric values you want it to use instead.

The X-Spam-Status: header also includes a flag to indicate if it has used the email in its "Bayesian" database of patterns that may categorize the message as spam (or non-spam). If you notice a "autolearn=no" in this header, you may wish to feed the message manually to the Bayesian learner.

References:

Spam Control at Nyx


Casper Maarbjerg, 2004-12-09