April 3, 2011

 Manually Upgrading Atmail 6.x.x Appliance to Atmail 6.20.7 +

If you wish to upgrade your appliance to the latest version of Atmail (6.20.7+), please do the following.

1. Download latest version

To install the latest Atmail patch download a copy from the client-portal page - http://atmail.com/portal/ or download the latest evaluation version.

In these instructions, replace [version] with your current version of Atmail. These are generic instructions to upgrade any previous release of Atmail 6.X to the latest version. The process is designed to be as straightforward as possible, and uses the WebAdmin interface to help simplify the upgrade.

2. Backup

Note: The upgrade and migration scripts have been used for production systems and considered stable.

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

mysqldump -u root -p atmail6 > /usr/local/atmail/atmail6[version]-backup.sql

tar cfvz atmail6[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, MTA-related code changes) must be backed up. The upgrade process will overwrite any modifications, and these must be merged in after the upgrade./

3. Extract the patch out into the directory for Atmail

Extract the files:

tar xfvz atmail6.mailserver.tgz -C /usr/local/

4. Permissions

You will now need to give Atmail correct permissions.

chown -R atmail /usr/local/atmail/webmail/

5. Rename Files

You will now need to rename the following file.
mv /usr/local/atmail/mailserver/bin/atmail-update-version /usr/local/atmail/mailserver/bin/atmail-update-version.off

6. WebAdmin Update

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.

7. Command Line Update

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 [version]

Where [version] is the previous version of Atmail installed.

8. Upgrade Complete

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.

Troubleshooting

Force Re-Run UpgradeIf you run into any troubles with the upgrade you may need to re-run the upgrade process.

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

update Config set keyValue = "6.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 6.20.1


Filed under: Installation, Atmail 6 — Stewart Bazley @ 5:49 pm

 

January 18, 2010

 Compiling PHP 5.3.x for Atmail and ArchiveVault

While tools such as yum, apt-get and pkg_add can make our life a lot easier when it comes to installing PHP and it's extensions (among other things), there is often a time when we need to go the old-fashioned route and compile from source. This brief article explains how to build PHP 5.3.x from source while detailing the configure options required for compiling PHP 5.3.x so that it plays nice with Atmail 6 and ArchiveVault.

General Install Instructions

  1. Download the PHP 5.3.x source from http://php.net
  2. extract into a temporary location on your server, say /tmp
  3. cd into the php-5.3.x/ dir that you just extracted
  4. now it's time to configure the PHP source for the options you want compiled so run this command:./configure --with-apxs2=/usr/sbin/apxs --with-mysql --enable-mbstring --with-ldap --with-pdo-mysql --with-zlib --with-openssl
  5. Once configure has successfully completed run this command : make install

Notes:

  1. You will need to replace /usr/sbin/apxs with the path to your apxs
  2. you may need to install mysql-devel if you run into configure or compile errors relating to the mysql extension
  3. you may need to install the zlib library if you run into errors relating to zlib extension (and may need to point to the location of zlib with --with-zlib=/path/to/zlib)
  4. you may need to install the OpenSSL library if it is not on your system
  5. On some 64bit systems (eg CentOS, RH) you may need to run: ln -s /usr/lib64/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so

Filed under: Uncategorized, Installation, PHP version, Atmail 6 — Brad Kowalczyk @ 8:14 pm

 

April 5, 2009

 SELinux and MySQL on the network

If you are using an external MySQL server, and an AtMail installation on an operating system that has SELinux enabled, you might experience the following:

- the installation fails when connecting to the MySQL server
- connecting manually using the mysql command succeeds.

In this case, you need to set SELinux so that it allows HTTP modules to connect to the network. This can be done by executing the following command:

% /usr/sbin/setsebool -P httpd_can_network_connect true 

Retry the installation afterwards.


Filed under: Uncategorized, Applications, Database, Installation, Linux version, Atmail 5, Atmail 6 — John Contad @ 5:53 pm

 

January 1, 2008

 Server optimization and @Mail

Below are some base suggestions on how to optimize a server running @Mail.

1) Set MaxRequestsPerChild in the httpd.conf between 100 -1000. This will force Apache threads to exit after serving X threads, useful for machines with limited memory. The more memory in the machine, the higher the MaxRequestsPerChild can be.

2) Tweak the wait_timeout in the /etc/my.cnf to expire any persistent database connections - http://kb.atmail.com/view_article.php?num=137

3) Upgrade the RAM in the machine. @Mail uses Mod_Perl which will use available memory to cache the scripts used by @Mail. The higher the memory, the better @Mail can perform under high-load.

4) Tweak the httpd.conf and disable and modules you don't need, since they are replicated for each process ( e.g mod_php, mod_rewrite, mod_dav, etc )

5) Load mySQL on it's own server , keep the front-end dedicated for @Mail.

6) Once the service grows you can distribute WebMail between multiple machines, to increase the overall performance - http://support.atmail.com/multiserver.html for details


Filed under: Installation — Ben Duncan @ 12:00 pm

 

 Locking Webadmin to an IP basis

Via the @Mail Webadmin you can optionally lock down access to a per IP basis.

This can be setup to block any IP's from accessing the Web-administration panel, and only allow your specified host.

To enable edit the file:

/usr/local/atmail/webmail/webadmin/.htaccess

Append:

order allow,deny
allow from 192.168.0.1 203.21.224.

Replace with your IP's as above. The example above will allow the Webadmin panel to be accessed from 192.168.0.1 or the 203.21.224.* network. Any other IP will receive the default Apache access-denied page.


Filed under: Installation — Ben Duncan @ 12:00 pm

 

 Updating Spam treatment for all users

When running the mail-server mode of @Mail, if Spam has become a problem and you automatically want to move all messages marked as Spam via Spamassassin to the users "Spam" folder, use the following SQL query:

mysql> update SpamSettings set value='trash' where preference='spam_treatment';

This will revert any previous settings for the Spam-treatment and move all Spam-messages to the users "Spam" folder.

Via the @Mail Webadmin > Filters > Filter Settings you can also define the default Spam-treatment for "new" accounts created on the system.


Filed under: Installation — Ben Duncan @ 12:00 pm

 

 Connecting WebMail via a different IMAP port number

Question:

We are running an IMAP server on a non-standard port ( not 143 ) and would like @Mail to access our server using Webmail.
How can we configure the port @Mail communicates to the IMAP server via?

>Answer:

For @Mail PHP 5.x

By editing the following files

/usr/local/atmail/webmail/libs/PEAR/Net/IMAP.php
/usr/local/atmail/webmail/libs/PEAR/Net/IMAPProtocol.php

1) In the file : /usr/local/atmail/webmail/libs/PEAR/Net/IMAP.php
Find:

function Net_IMAP($host = 'localhost', $port = 143)

Replace 143 with desired port number.

2) In the file: /usr/local/atmail/webmail/libs/PEAR/Net/IMAPProtocol.php
Find:

function Net_IMAP($host = 'localhost', $port = 143)

Replace 143 with desired port number.

Save the changes and @Mail will now use the port specified via IMAP.


Filed under: Installation — Stewart Bazley @ 12:00 pm

 

 Compiling Exim and Courier on an Intel Mac OS X

When compiling Exim or Courier in an Intel Mac OSX environment, you might see the following error:

ld64-59.3 failed: symbol(s) not found

This is caused by MySQL's flags being set for both the ppc and x86_64 architecture. To fix, just do the following:

- open up /usr/bin/mysql_config:

- find the line:

ldflags=' -arch ppc64  -arch x86_64 -pipe'

- change this to:

ldflags=' '

- then, find:

cflags="-I$pkgincludedir -O3 -fno-omit-frame-pointer  -arch ppc64  -arch x86_64 -pipe " #note: end space!

- change to:

cflags="-I$pkgincludedir -O3 -fno-omit-frame-pointer  " #note: end space!

- retry the installation afterwards.


Filed under: Installation — John Contad @ 12:00 pm

 

 Installing the PHP Mailparse Extension

The information in this article is largely based on information found at http://php.net/manual/en/install.pecl.php

You have two options for installing the Mailparse extension:

1. Use the pecl command if available:

$ pecl install mailparse

This will download the source for mailparse, compile, and install mailparse.so into your PHP extensions directory.

2. Use the phpize command:

Download the source code for the Mailparse extension and extract it then:

$ cd mailparse_src (replace mailparse_src with the path to the mailparse source on your system)
$ phpize
$ ./configure
$ make
# make install

A successful install will have created mailparse.so and put it into the PHP extensions directory.

After you have completed either of the two options above you will need to edit your php.ini and add the following line:

extension=mailparse.so

You may also need to add the path to your php extensions:

extension_dir=/path/to/php-extensions

(replace with the path to your actual PHP extensions directory)Restart apache and the Mailparse extension should now be loaded.

(Note: the above methods should work for installing any PHP pecl extension)


Filed under: Installation — Brad Kowalczyk @ 12:00 pm

 

 Upgrading to @Mail 5.0 - Mailserver edition

These instructions are intended if you are running the mail-server edition of @Mail.

Upgrading to the server-mode of @Mail is easy using the latest 5.0 release. The upgrade process supports using any previous @Mail 4.X version, installations will be fully updated to the PHP 5.0 release. No extra steps or scripts are necessary to run.

Installation steps:

Pre-upgrade: Backup your entire /usr/local/atmail directory, and mysqldump backup the existing database for @Mail. You must keep a backup of the existing version before upgrading.

Step 1: Download @Mail PHP5 from the client portal page

Step 2: Stop Apache and @Mail services during the upgrade:

/etc/init.d/atmailserver stop
apachectl stop

This is required since the upgrade overwrites the existing mail-server which is running, and the active Webmail via Apache

Step 3: Move the previous @Mail webmail directory in Perl to a new location:

mv /usr/local/atmail/webmail /usr/local/atmail/webmail.perl

The PHP release will overwrite this directory.

Also move the previous Spamassassin directory which is replaced with the new version

mv /usr/local/atmail/spamassassin /usr/local/atmail/spamassassin.perl

Step 4: Extract the new PHP version into the @Mail path:

tar xfvz atmailphp5server.tgz -C /usr/local/

Step 5: Run the migration script which updates any previous @Mail 4.X version to the latest database structure. The script will also copy the existing Config.pm file in Perl to the PHP syntax ( which contains your database preferences, settings and runtime preferences )

cd /usr/local/atmail/webmail/docs/dbpatch/
perl upgrade-4x-5php.pl /usr/local/atmail/webmail /usr/local/atmail/webmail.perl/

Where /usr/local/atmail/webmail is the new location in PHP, and /usr/local/atmail/webmail.perl/ is the previous version.

This script will also attempt to disable the existing Mod-perl configuration for @Mail in the /etc/httpd/conf.d/perlatmail.conf file. If you are running a custom Apache or different directory structure, you must edit the httpd.conf and remove the mod-perl configuration for @Mail. This is required, otherwise Apache will not start since the previous perl installation is missing.

Step 6: Run the new PHP installation script, to prepare your system for the new version and check your runtime PHP settings

cd /usr/local/atmail
php server-install.php

During the installation process, select your previous mysql details and database, which will be pre-defined from the migration script run.

Once prompted to re-install the SMTP, POP3/IMAP, Spamassassin and Anti-Virus packages, select "Yes" . This is required to update your existing mail-server binaries to the latest release.

During the installation run the server-diagnostics utility at the end of the configuration. This will validate the new version is installed and working for new accounts.

Step 7: Once the configuration is complete, restart the Webserver for the new Webmail version in PHP to be active. Once complete, modify the existing login HTML template of @Mail back into your previous theme if changed.

Congratulations! You are now upgraded to the latest @Mail 5.0 release in PHP.


Filed under: Installation — Ben Duncan @ 12:00 pm