This document aims to highlight some of our recommended changes, modifications, and configuration options that could optimize your mailserver and make for faster performance. Sections are split into specific components of a mailserver, and you may pick the changes that suit your system best.
- On-Premise Server + WebMail Installations: Version 6.0 > Current Version
- Webmail Only Installations: Version 6.0 > Current Version
- Running your own Atmail server
AbookID as an index
Specifying AbookID as an index can drastically alter the performance of your webmail component. This applies to implementations with external, or low MySQL performance with userbases exceeding 10,000. In MySQL:
MySQL Configuration for performance tuning
You can use the following configuration block under the '''[mysqld]''' definition to increase performance for Atmail. In your '''/etc/my.cnf''' file or equivalent:
MySQL binlog location
Make sure that the MySQL binlogs and relay logs have the appropriate disk space. Binlogs can accumulate really fast - with some instances taking up to 30GB a day. If you specify a directory for the binlogs, make sure that a.) The drive/partition it points to has enough space or b.) The '''expire_logs_days''' variable ('''/etc/my.cnf''') is enough to limit the space used.
Mod_Expires and Mod_Deflate
With Apache, you can use the '''mod_expires''' and '''mod_deflate modules''' to gain a performance boost. The mod_expires module provides caching, while the mod_deflate module compresses downloadable items to decrease bandwidth usage.
Before following this guide, make sure that mod_gzip and mod_expires are enabled for your Apache server. Most base installations of Apache 2.2 and higher are likely to have these by default.
Open up your Apache configuration file. Then, add the following at the bottom:
You may use a different Document Root for your Atmail installation; in implementations where you are using the webmail client version, this is usually the case. If this is so, you will need to modify the Directory declarations to suit your Apache root. The config file has the following line that you need to change:
Change to your Atmail document root. An installation that uses /var/www/html/atmail/webmail would have the following:
Save changes, and restart Apache.
Below is a simple process of making sure that your attachments are protected.
First, open up your Apache file. In Redhat derivatives, this will be in /etc/httpd/conf/httpd.conf. In Debian/Ubuntu derivatives, this will be in /etc/apache2/apache2.conf.
Set the maximum RAM usage. Open up /usr/local/atmail/webmail/bootloader.php. You can find this line:
Change this to:
This will limit memory usage to 256M.
Set the time limits. Time limits can be imposed that should prevent stale processes from taking too much time. Find this line in your bootloader.php:
Change this to:
Disable .po and .mo files
Usage of the .po and .mo files can slow down your system. You can remove the aforementioned files, leading to a considerable performance boost:
To further secure the installation
move or remove the installation folder and or make sure there is a .htaccess file to prevent access
Put this in the .htaccess file:
Then secure the .htaccess file:
File and directory permissions and access rights should be locked down to secure this installation.
Do it manually or run the following command from the CLI as root to secure the files.
Copy the log cleaning script to your daily cron directory.
To enable the log table pruning feature please copy this script into your daily cron directory and make sure it has execute permissions.