SpamAssassin is email spam filter software maintained by the Apache Foundation and written in Perl.
USE flags for mail-filter/spamassassin An extensible mail filter which can identify and tag spam
||Add support for sys-libs/db (Berkeley DB for MySQL)|
||Install a cron job to update SpamAssassin's rules daily.|
||Add support for IP version 6|
||Add LDAP support (Lightweight Directory Access Protocol)|
||Add mySQL Database support|
||Add support for the postgresql database|
||Build qmail functionality and docs|
||Add support for sqlite - embedded sql database|
||Add support for SSL/TLS connections (Secure Socket Layer / Transport Layer Security)|
||Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)|
||Verify upstream signatures on distfiles|
emerge --ask mail-filter/spamassassin
SpamAssassin comes with a number of modules (or plugins) that can be enabled or disabled via configuration files.
- /etc/mail/spamassassin - Directory containing SpamAssassin modules.
When new plugins appear in a release of SpamAssassin, they are configured in a file named (for example) v341.pre, which corresponds to SpamAssassin v3.4.1 and contains configuration for new plugins as of that version.
A user's local configuration belongs in local.cf; however, any file with a .cf suffix (in that same directory) will be loaded by SpamAssassin.
Bayes SQL database
By default, SpamAssassin comes configured to use BerkeleyDB (
USE=berkdb) for its bayes database. System administrator's who choose some other database backend (e.g.
USE=sqlite) will to configure SpamAssassin to use the alternative database backend before SpamAssassin will run.
Detailed instructions are provided with SpamAssassin and can be found in README.bayes within the SpamAssassin documentation directory (something like /usr/share/doc/spamassassin*/README.bayes).
Spam detection rules
Gentoo's SpamAssassin ebuilds do not include spam detection rules, so these will need downloaded as part of the post-install process. The simplest way to do so is to run the sa-update command.
The SpamAssassin project's GPG key (so that the authenticity of the rules can be verified) must be downloaded and installed:
wget -q https://spamassassin.apache.org/updates/GPG.KEY
sa-update --import GPG.KEY
Next download the rules:
To improve performance it is recommended to compile the spam detection rule set:
Automated spam rule updates
The SpamAssassin project regularly releases new and updated rules. It is a good idea to schedule updates (at least) daily, so that the rules are never out of date. A cron job is ideal for this, and newer revisions of the SpamAssassin package supply a cron file. Enable the
cron USE flag and re-emerge mail-filter/spamassassin.
Thunderbird — Mozilla's solution to the e-mail client.