Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: [Original edit by BillCole] Update status of Sought rules

...

(On Debian based systems, set "CRON=1" in /etc/default/spamassassin - this is not the default.)

Enable network rules

This is the default, but disabling network rules (including DNS rules) causes SpamAssassin to be wrong on about 3 times more emails. Network tests may have been disabled by running spamassassin or spamd with the command line arguments -L or --local. DNS rules may have been disabled with "dns_available no" in local.cf. You should run a local caching DNS server for efficiency.

...

No Format
Apr 14 16:24:37.315 [4709] dbg: plugin: loading Mail::SpamAssassin::Plugin::Pyzor from @INC
Apr 14 16:24:37.318 [4709] dbg: pyzor: network tests on, attempting Pyzor
Apr 14 16:24:37.318 [4709] dbg: plugin: loading Mail::SpamAssassin::Plugin::Razor2 from @INC
Apr 14 16:24:37.381 [4709] dbg: razor2: razor2 is available, version 2.84

Trusted Networks settings

Ensure that internal_networks and trusted_networks are set correctly. Often, spamassassin will intelligently do the correct thing by default. But if you're receiving a significant portion of your email via a trusted relay, it needs to be listed in one of these manually, otherwise the wrong hop will be used for things like DNS blacklist tests. More info at TrustPath.

Verify AWL and the Bayesian classifier aren't poisoned

...

SARE rules have not been updated in years, and are therefore actively harmful. They are not included in SpamAssassin by default, but often have been added to local configurations.

...

Remove Sought rules

SoughtRules is was a custom rule set generated from spam 4 times a day by a SpamAssassin developer. This rule set is no longer maintained and due to its design may have randomly harmful effects on scoring.

Only accept email in specified languages - TextCat

In /etc/spamassassin/local.pre add:

loadplugin Mail::SpamAssassin::Plugin::TextCat

In /etc/spamassassin/local.cf add:

ok_languages en es

Where "en es" is a list of codes for languages you wish to accept. The full list is in the TextCat documentation.

It is very important that the loadplugin line be added to a .pre file not a .cf file so it is loaded before the rules files are loaded, otherwise those rules will not get enabled.

You may also want to increase the score from the default of 2.8:

score UNWANTED_LANGUAGE_BODY 5

Use a local, caching, non-forwarding DNS sever

CachingNameserver.

Some DNS Blacklists and Whitelists will block queries from DNS servers issuing what they consider too many queries. This is often avoided by running a local DNS server. Also, it's good for performance.

Run SPF at your MTA

SPF is intended to operate on the envelope sender (SMTP protocol MAIL FROM) which is not available in a standard way by the time the email gets to SpamAssassin. The solution is to run SPF at your MTA (Message Transfer Agent, such as Postfix, Exim, Qmail, Sendmail, etc.). This is, of course, dependent on what software you're using, but it should insert a Received-SPF: header for use by SpamAssassin. If you do not run SPF at your MTA, you really should set ignore_received_spf_header 1 so you don't end up honoring headers inserted by spammers.

...

If it's worth the time to increase the accuracy of filtration of your own personal email, you can manual manually sort it into ham and spam folders, and then use sa-learn to train it. This can be used for a group effectively if the group is well trained (not to classify mailing lists they've subscribed to but lost interest in as spam).

...

No Format
spamassassin -D --lint 2>&1 | grep -i failed

Writing Rules

WritingRules - when existing tests are not sufficient.

SpamTips.org setup guide

http://www.spamtips.org/p/ultimate-setup-guide.html

...