Spamassassin Configuration

  • Configuration File
All custom configuration belongs in the spamassassin local.cf file. In the example below, I have told spamassassin to use SQL to store user preferences, as well as Bayesian filter data, and Auto-Whitelist settings. Pleas refect to the Spamassassin documentation for a more detailed explanation of these options.
shell> cat /etc/mail/spamassassin/local.cf
use_auto_whitelist              1

user_scores_dsn                 DBI:mysql:spamassassin:localhost
user_scores_sql_username        username
user_scores_sql_password        password

bayes_store_module              Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn                   DBI:mysql:spamassassin:localhost
bayes_sql_username              username
bayes_sql_password              password

auto_whitelist_factory          Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                    DBI:mysql:spamassassin:localhost
user_awl_sql_username           username
user_awl_sql_password           password
  • Spamassassin Startup Options
In order to connect to spamassassin via a local socket, you must be sure to start spamassassin with the correct options. Creating this file will allow the startup script to use the proper options.
rootshell> echo 'SPAMDOPTIONS="-d -q -x -m5 --socketpath=/tmp/spamd.sock"' > /etc/sysconfig/spamassassin
The configuration options above are defined as follows :
-d
   Run in Daemon Mode

-q
   Enable SQL config

-x
   Disable user config files

-m#
   Allow maximum num children

--socket-path=PATH
   Listen on given UNIX domain socket
  • Starting spamd
Now we need to make sure that spamd starts up when the machine reboots. Spamd is the daemon process that actually does all of the work. The RPM version installs the startup scripts automatically. If you've compliled by hand, see the spamassassin documentation for more info.
rootshell> chkconfig --list spamassassin
spamassassin 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rootshell> chkconfig spamassassin on
rootshell> chkconfig --list spamassassin
spamassassin 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rootshell> service spamassassin start
Starting spamd: [ OK ]


Page last modified on December 28, 2006, at 06:48 PM

Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied in /var/www/html/pmwiki.php on line 638

PmWiki can't process your request

Cannot acquire lockfile

We are sorry for any inconvenience.

More information

Return to http://toaster.godshell.com/index.php