How can we help?


Upgrading SpamAssassin

Stewart -

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 file, as many options have been deprecated.


  1. Download and untar the newest version of SpamAssassin from:
    % wget "" 
    % 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/ 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/ 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.


Contact our support team

+61 (7) 5357 6605