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

Atmail 7.X to Atmail 7.7.1 Server + WebMail Upgrade

Stewart -

PROBLEM
I'm not sure how to upgrade my Atmail Server + WebMail.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 7.0 > 7.7.1

CAUSE
Atmail needs to be upgraded to the latest version.

RESOLUTION

Multistep upgrade is recommended when running older versions of atmail. In these instructions, replace [version] with your current version of Atmail.

Atmail 7.2+
PHP 5.3+ required for 7.2.0+

Backup

Before proceeding it is strongly recommended that you make a backup of your current Atmail installation:

mysqldump -u root -p atmail7 > /usr/local/atmail/atmail-7[version]-backup.sql
tar cfvz atmail-7[version]-backup.tgz /usr/local/atmail /etc/httpd/conf/httpd.conf /etc/init.d/atmailserver

This is required before you upgrade in case you need to roll-back any changes, do not skip this step.

Any customizations to Atmail (PHP, HTML, Anti-Spam and MTA-related code changes) must be backed up. The upgrade process will overwrite any modifications, and these must be merged in after the upgrade.

Upgrade atmail 7.0.0 > atmail 7.1.5

  1. Download the atmail 7.1.5 tarball via the following URL.
    http://download.atmail.com/old-releases/atmail7.1.5.mailserver.tgz
  2. Extract the software out into the directory for Atmail
    tar xfvz atmail7.1.5.mailserver.tgz -C /usr/local/
  3. You will now need to give Atmail correct permissions.
    chown atmail:atmail /usr/local/atmail/;
    chown -R atmail:atmail /usr/local/atmail/webmail;
    cd /usr/local/atmail/webmail/;
    find . -name .htaccess -exec chown root:root {} \;
    find . -name .htaccess -exec chmod 644 {} \;
  4. RPM/Appliance Install ONLY:
    mv /usr/local/atmail/mailserver/bin/atmail-update-version /usr/local/atmail/mailserver/bin/atmail-update-version.off
  5. Visit the WebAdmin of Atmail and use the Update software link. This will guide you through the web-based upgrade utility for the database schema updates and config changes:

    e.g http://server.com/mail/index.php/admin/

    Where server.com/mail/index.php is the URL of the Atmail software on your server. Login to Web Administration using your admin username/password, then click the License tab > Update software.

  6. Depending on the software update, additional packages may need to be re-installed or re-compiled if you are using the Email Server version of Atmail. If prompted during the Web Admin upgrade, run the additional upgrade utility from a command-line:
    cd /usr/local/atmail/ 
    php server-update.php

Upgrade atmail 7.1.5 > atmail 7.4.0

  1. Download the latest atmail 7.4.0 tarball via the following URL.
    http://download.atmail.com/old-releases/atmail-7.4.0-mailserver.tgz
  2. Extract the software out into the directory for Atmail
    tar xfvz atmail-7.4.0-mailserver.tgz -C /usr/local/
  3. You will now need to give Atmail correct permissions.
    chown atmail:atmail /usr/local/atmail/;
    chown -R atmail:atmail /usr/local/atmail/webmail;
    cd /usr/local/atmail/webmail/;
    find . -name .htaccess -exec chown root:root {} \;
    find . -name .htaccess -exec chmod 644 {} \;
  4. RPM/Appliance Install ONLY:
    mv /usr/local/atmail/mailserver/bin/atmail-update-version /usr/local/atmail/mailserver/bin/atmail-update-version.off
  5. Visit the WebAdmin of Atmail and use the Update software link. This will guide you through the web-based upgrade utility for the database schema updates and config changes:

    e.g http://server.com/mail/index.php/admin/

    Where server.com/mail/index.php is the URL of the Atmail software on your server. Login to Web Administration using your admin username/password, then click the License tab > Update software.

  6. Depending on the software update, additional packages may need to be re-installed or re-compiled if you are using the Email Server version of Atmail. If prompted during the Web Admin upgrade, run the additional upgrade utility from a command-line:
    cd /usr/local/atmail/ 
    php server-update.php

Upgrade atmail 7.4.0 > atmail 7.5.0.2

  1. Download the latest atmail 7.5.0.2 tarball via the following URL.
    http://download.atmail.com/old-releases/atmail7.5.0.2.mailserver.tgz
  2. Extract the software out into the directory for Atmail
    tar xfvz atmail7.5.0.2.mailserver.tgz -C /usr/local/
  3. You will now need to give Atmail correct permissions.
    chown atmail:atmail /usr/local/atmail/;
    chown -R atmail:atmail /usr/local/atmail/webmail;
    cd /usr/local/atmail/webmail/;
    find . -name .htaccess -exec chown root:root {} \;
    find . -name .htaccess -exec chmod 644 {} \;
  4. RPM/Appliance Install ONLY:
    mv /usr/local/atmail/mailserver/bin/atmail-update-version /usr/local/atmail/mailserver/bin/atmail-update-version.off
  5. Visit the WebAdmin of Atmail and use the Update software link. This will guide you through the web-based upgrade utility for the database schema updates and config changes:

    e.g http://server.com/mail/index.php/admin/

    Where server.com/mail/index.php is the URL of the Atmail software on your server. Login to Web Administration using your admin username/password, then click the License tab > Update software.

  6. Depending on the software update, additional packages may need to be re-installed or re-compiled if you are using the Email Server version of Atmail. If prompted during the Web Admin upgrade, run the additional upgrade utility from a command-line:
    cd /usr/local/atmail/ 
    php server-update.php


Upgrade atmail 7.5.0.2 > atmail 7.7.1

  1. Download the latest atmail 7.7.1 tarball via the following URL.
    http://download.atmail.com/old-releases/atmail.7.7.1.mailserver.tgz
  2. Extract the software out into the directory for Atmail
    tar xfvz atmail7.7.1.mailserver.tgz -C /usr/local/
  3. You will now need to give Atmail correct permissions.
    chown atmail:atmail /usr/local/atmail/;
    chown -R atmail:atmail /usr/local/atmail/webmail;
    cd /usr/local/atmail/webmail/;
    find . -name .htaccess -exec chown root:root {} \;
    find . -name .htaccess -exec chmod 644 {} \;
  4. RPM/Appliance Install ONLY:
    mv /usr/local/atmail/mailserver/bin/atmail-update-version /usr/local/atmail/mailserver/bin/atmail-update-version.off
  5. Visit the WebAdmin of Atmail and use the Update software link. This will guide you through the web-based upgrade utility for the database schema updates and config changes:

    e.g http://server.com/mail/index.php/admin/

    Where server.com/mail/index.php is the URL of the Atmail software on your server. Login to Web Administration using your admin username/password, then click the License tab > Update software.

  6. Depending on the software update, additional packages may need to be re-installed or re-compiled if you are using the Email Server version of Atmail. If prompted during the Web Admin upgrade, run the additional upgrade utility from a command-line:
    cd /usr/local/atmail/ 
    php server-update.php
  7. Congratulations, the upgrade is now complete. You can now reload the Webmail interface of Atmail and begin using the latest release and features.If you've made any customizations to the HTML templates, images, or source-code, these changes will need to be copied back in after the upgrade. We recommend using the “diff” command-line utility to compare any local customizations to the latest version.

Post-Upgrade (Version 7.x to 7.5.2+)

How to upgrade from version 7.x to 7.5.2+ and have your logs in a different database. Please skip this step if already running 7.5.2+.

One of the improvements within atmail version 7.5.2 is the option to store logs in a different database. However, it’s important to note that this option is only offered for configuration by default during fresh installs.

If you are upgrading your environment from a previous version of atmail and want to take advantage of this improvement, the following manual steps will be required, as a post upgrade procedure:

  1. Create a new database specifically for logs. i.e atmail_logs on the same or different MySQL server.
  2. Populate the new database using

    /usr/local/atmail/webmail/install/atmail7-logs.sql

    --
    -- Table structure for table `Log_Error`
    --
    
    CREATE TABLE `Log_Error` (
      `LogMsg` varchar(255) default NULL,
      `LogDate` datetime default NULL,
      `Account` varchar(128) NOT NULL default '',
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_Login`
    --
    
    CREATE TABLE `Log_Login` (
      `LogDate` datetime default NULL,
      `LogType` tinyint(1) default NULL,
      `LogIP` int(10) UNSIGNED DEFAULT NULL,
      `Account` varchar(128) default NULL,
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `iLogType` (`LogType`),
      KEY `iLogIP` (`LogIP`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_RecvMail`
    --
    
    CREATE TABLE `Log_RecvMail` (
      `LogDate` datetime default NULL,
      `LogIP` int(10) UNSIGNED DEFAULT NULL,
      `EmailFrom` varchar(128) default NULL,
      `MessageID` varchar(16) default NULL,
      `Account` varchar(128) NOT NULL default '',
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `iLogIP` (`LogIP`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_SendMail`
    --
    
    CREATE TABLE `Log_SendMail` (
      `LogDate` datetime default NULL,
      `LogIP` int(10) UNSIGNED DEFAULT NULL,
      `EmailTo` varchar(128) default NULL,
      `MessageID` varchar(16) default NULL,
      `Account` varchar(128) NOT NULL default '',
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `iLogIP` (`LogIP`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_Spam`
    --
    
    CREATE TABLE `Log_Spam` (
      `LogDate` datetime default NULL,
      `LogType` tinyint(1) default NULL,
      `LogIP` int(10) UNSIGNED DEFAULT NULL,
      `SpamPoints` smallint(2) default NULL,
      `EmailFrom` varchar(128) default NULL,
      `Account` varchar(128) NOT NULL default '',
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `iLogIP` (`LogIP`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_Virus`
    --
    
    CREATE TABLE `Log_Virus` (
      `LogDate` datetime default NULL,
      `LogIP` int(10) UNSIGNED DEFAULT NULL,
      `EmailFrom` varchar(128) default NULL,
      `VirusName` varchar(128) default NULL,
      `Account` varchar(128) NOT NULL default '',
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_Device`
    --
    
    CREATE TABLE `Log_Device` (
      `LogDate` datetime default NULL,
      `LogIP` int(10) UNSIGNED DEFAULT NULL,
      `DeviceID` varchar(128) default NULL,
      `DeviceType` varchar(128) default NULL,
      `Account` varchar(128) default NULL,
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`),
      KEY `iAccount` (`Account`),
      KEY `iDeviceID` (`DeviceID`),
      KEY `iDeviceType` (`DeviceType`),
      KEY `LogDate` (`LogDate`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `Log_Count_Cache`
    --
    
    CREATE TABLE `Log_Count_Cache` (
      `LogTable` varchar(128) default NULL,
      `LogCount` bigint(12) unsigned NOT NULL,
      `Timestamp` datetime default NULL,
      `id` bigint(12) unsigned NOT NULL auto_increment,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  3. Edit and add a new logging section in webmail/config/dbconfig.ini.
    Example
    [production]
    database.adapter = pdo_mysql
    database.params.host = "127.0.0.1"
    database.params.username = "user"
    database.params.password = "password"
    database.params.dbname = "atmail7"
    database.params.configtable = Config
    database.params.masterkey = "MASTERKEY"
    [logging]
    database.adapter = pdo_mysql
    database.params.host = "127.0.0.1"
    database.params.username = "user"
    database.params.password = "password"
    database.params.dbname = "atmail7_logs"
    database.params.configtable = Config
    database.params.masterkey = "MASTERKEY"
  4. Update exim configure and add a new mysql server for logs and update the mysql lookups call.
    • Add a new mysql server:
      hide mysql_servers = 127.0.0.1/MY_ATMAIL_DATABASE/user/password:\
      127.0.0.1/MY_ATMAIL_LOGS_DATABASE/user/password
    • Replace all mysql lookups for main queries from:
      lookup mysql{... 
      to
      lookup mysql{servers=127.0.0.1/MY_ATMAIL_DATABASE/user/password; ...
    • Replace mysql lookup for the single log query from:
      lookup mysql{MYSQL_SENDLIMIT ... 
      to
      lookup mysql{servers=127.0.0.1/MY_ATMAIL_LOGS_DATABASE/user/password; MYSQL_SENDLIMIT ...

Post-Upgrade (Version 7.x to 7.6+)

Two scripts need to be run (after the successful upgrade and services are back online). Please skip this step if already running 7.6+.

  • Bayes:

    Atmail 7.6 includes improved Bayes filtering, but for this to be effective the previous Bayes DB must be purged and message re-synced to learn spam/non-spam messages. Post upgrade, run the bayes-resync.php script in the background to update SpamAssassin.
    php /usr/local/atmail/webmail/utilities/tools/bayes-resync.php
  • ClamAV:

    Additionally, the ClamAV anti-virus system has been updated with improved virus signatures. It is recommended to scan the entire email filesystem, and automatically detect and remove virus emails which exist in a users mailbox.

    Run:
    /usr/local/atmail/av/bin/clamscan -v -r --scan-mail /usr/local/atmail/users/ --move=/tmp/clam/
    Any emails detected with a virus will be automatically removed from the users mailbox, and placed in /tmp/clam/.

    After analyzing the folder, it is recommended that it be removed from the filesystem.

Troubleshooting

Spamassassin Upgrade

Atmail 7.6+ includes an upgraded version of spamassassin. If when running the php script, server-update.php, and it hangs at the following section, you will have missing dependencies.

==> Found dependencies: HTTP::Status, HTTP::Response, HTTP::Request
--> Working on Net::HTTP
Fetching http://www.cpan.org/authors/id/E/ET/ETHER/Net-HTTP-6.09.tar.gz ... OK
Configuring Net-HTTP-6.09 ... OK

To resolve, install the following modules via mcpan.

  • IO::Socket::INET6
  • IO::Socket::SSL
  • Compress::Zlib

Perl has a module called CPAN with which one can install CPAN modules along with all of the modules they depend on. To invoke it type perl -MCPAN -e shell at the command line while being a super-user, and follow the instructions it gives you. The install command can be used to automatically install modules.

install IO::Socket::INET6

Force Re-Run Upgrade

If you run into any troubles with the upgrade you may need to re-run the upgrade process.

Assuming that your last version was 7.20.1; Login to your Atmail database and execute the following command.

mysql> update Config set keyValue = "7.20.1" where keyName = "version";

This will fool the WebAdmin update scripts and enable re-running the sql schema updates via the WebAdmin > License > Update Software.

Following the success of the WebAdmin update, please then execute the server-update.php file as the update page will instruct you.

php server-update.php 7.20.1
Have more questions? Submit a request

Comments


Contact our support team


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