help centre
For more info visit status.atmail.com

How can we help?


Search our knowledge base for answers to
common questions and latest updates.



My activities New request

Follow

Upgrading SpamAssassin

Stewart -

PROBLEM
I want to upgrade my Atmail SpamAssassin installation.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version

CAUSE
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.

RESOLUTION

  1. 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
  2. Stop the Atmail service:
    % /etc/init.d/atmailserver restart
  3. 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;
    % make install;
  4. 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;

  5. 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
  6. 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
  7. Restart Atmail:
    % /etc/init.d/atmailserver restart
    This should then have your SpamAssassin 3.0 installation ready.
Have more questions? Submit a request

Comments


Contact our support team


+61 (7) 5357 6605       support@atmail.com