Set up SpamAssassin

SpamAssassin is a great tool for detecting spam. Although it may be a bit ‘bloated’ and resource hungry, I still like to use it. Whether or not you want to use it is up to you. I’ve heard of others trading this step out for spamd but I haven’t gotten around to integrating it properly. So, SpamAssassin it is! You can read more about SpamAssassin by visiting their web site at http://spamassassin.apache.org/.

Edit the /usr/local/etc/mail/spamassassin/local.cf file:
Add the below to the bottom of the file and edit the RED TEXT.

ifplugin Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn DBI:mysql:maia
bayes_sql_username vscan
bayes_sql_password vscan_user_password
auto_whitelist_factory
endif

ifplugin Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn DBI:mysql:maia
user_awl_sql_username vscan
user_awl_sql_password vscan_user_password
bayes_auto_expire 0
endif

# Change the below to reflect your correct internal and external networks.
internal_networks 192.168.1.0/24
trusted_networks 192.168.1.0/24 123.456.789.0/24

Configure RAZOR for reporting:
Change “username@domain.tld” and “some_password” in the register line.

# su - vscan
$ razor-admin -discover
$ razor-admin -create
$ razor-admin -register -l -user=username@domain.tld -pass=some_password
$ exit

NOTE:

The above user should be an actual email address you check. The password can be any password you’d like. It’s only needed by razor2 to identify and report spam.

Page 7 or back to Page 5