I want to upgrade my Atmail SpamAssassin installation.
- On-Premise Server + WebMail Installations: Version 6.0 > Current Version
When you want to upgrade SpamAssassin 2.63 for Atail to 3.0, keep in mind that the two versions have different SQL querying schemas. Also, you may need to take out some lines in the local.cf file, as many options have been deprecated.
- Download and untar the newest version of SpamAssassin from: http://spamassassin.apache.org/
% wget "http://domain.com/Mail-SpamAssassin-3.x.x.tar.gz"
% tar xvfz Mail-SpamAssassin-3.x.x.tar.gz
- Stop the Atmail service:
% /etc/init.d/atmailserver restart
- Build the binary with the options specified below:
% cd Mail-SpamAssassin-3.x.x;
% perl Makefile.PL INSTALLDIRS=vendor PREFIX=/usr/local/atmail/spamassassin/ CONFDIR=/usr/local/atmail/spamassassin/etc/ DATADIR=/usr/local/atmail/spamassassin/etc/;
% make install;
- Alter your /usr/local/atmail/spamassassin/etc/sqlsettings.cf file to contain the following:
user_scores_dsn DBI:mysql:atmaildb: user_scores_sql_username dbuser user_scores_sql_custom_query SELECT preference, value FROM SpamSettings WHERE username = _USERNAME_ OR username = '@GLOBAL' ORDER BY username DESC user_scores_sql_password mypass
- Where [atmaildb] is your Atmail database;
- [dbuser] is your Atmail database user;
- [mypass] is your MySQL password;
Alter your /usr/local/atmail/spamassassin/etc/local.cf file to contain the following:
# Default settings, hardcoded skip_rbl_checks 1 rewrite_header subject * Identified Spam:# Settings that can be changed via the Webadmin required_hits 5 report_safe 1# Bayesian Filtering Settings use_bayes 1 bayes_auto_learn_threshold_spam 10.0 bayes_auto_learn_threshold_nonspam 1.0 bayes_min_ham_num 200
- Save all changes, then sync and lint SpamAssassin:
% /usr/local/atmail/spamassassin/bin/sa-learn -D --sync % /usr/local/atmail/spamassassin/bin/spamassassin --lint -D
- Restart Atmail:
% /etc/init.d/atmailserver restartThis should then have your SpamAssassin 3.0 installation ready.