Kerio MailServer

Introduction
Kerio Connect, formerly known as Kerio MailServer (KMS) (02-09-2010), is a closed source based mail server for Windows, Mac OS X, and Linux that offers comparable features to Microsoft's Exchange mail server. While Kerio does not officially support most Linux distributions such as Gentoo, it does not discourage its use in such unsupported distributions either. This page will therefore serve to illustrate how an administrator may install and configure Kerio Connect to work on his or her Gentoo-based server.

Prerequisites
The following is a list of known requirements for the full and stable operation of Kerio Connect. Some features may not work should these requirements not be met.


 * or higher for functional operation of the webmail feature is required. Older versions of glibc may also work with the USE flag enabled.
 * . This package is required if you're using a version of Kerio MailServer older than version 6.4.0. Newer versions, namely Kerio Connect, should not be affected by the absence of this package.
 * is required for 64-bit support.
 * is required for 64-bit support.
 * (optional). This package is used in this guide to unpack the rpm-compressed archive containing the server files. For this guide this package is a requirement; however, other methods to unpack the archive may alternatively be used. Support for and other such archive utilities will not however be provided by this guide should you choose to use them.
 * Kerio Connect Linux Server RPM Package. You may find the latest version of the Kerio Connect server package on the Kerio Connect Downloads page and older versions in the Kerio Legacy Downloads page.
 * Kerio Connect Linux Server Administrative GUI RPM Package (optional). Also located on the Kerio Connect Downloads page, this package is meant for GUI-based administration and should be installed on a client system rather than on the server itself. A Windows-based version of the administration client exists as well. Please note however that official Kerio support for this package in Kerio Connect versions 7.0 and above is depreciated and has been moved to a built-in web administration module.
 * Have root access to the server as all of the installation instructions below must be run as root (or with root privileges).

Installation

 * Step 1. Download the Kerio Connect server RPM archive to a temporary location ( for example) and unpack it using rpm2targz:
 * Step 2. Create a working path for the server package ( will be used by default):
 * Step 3. Move the contents of the temporary directory  to your new working directory :
 * Step 4. Change the permissions of the working directory to something secure (ie. root:root).
 * Step 5 (Optional). If you wish to change the storage location of your mail files you should do so now. By default Kerio will store mail in the server directory under . Should you change its location be sure to indicate the new location during the wizard configuration process or the default location will be used. You may also edit the location of the storage directory at any time during normal server operation via the administration GUI or via editing the configuration file directly.
 * Step 6. Run the Kerio Connect Configuration Wizard to setup your mail server:
 * Step 7. Secure your configuration files as in step 4:
 * Step 8. Create the and  files (documented below) and start your server. Should everything work correctly up until now you may connect to your server through the administration GUI ( https://:4040 ) and begin modifying your mail server as needed. Optionally you may include your mail server to be started at boot:

Optional Components
The following is a list of additional programs you may wish to use alongside Kerio Connect:

AVG Anti-Virus
For more, but rather limited information, see AVG's website on the AVG Anti-Virus Email Server Edition. The Kerio Knowledgebase also has an article on setting up AVG with Kerio Connect.

ClamAV
Clam AntiVirus is an open source anti-virus toolkit that is specifically targeted at mail server and gateway integration. It introduces a full set of features including a scalable, multi-threaded daemon designed for email scanning and is developed under the GPL license. It is officially supported by Kerio Technologies, Inc.. Prior to Kerio MailServer version 6.7.2, and immediately following the release of ClamAV version 0.95.*, there was an intermittent period of incompatibility between the two programs. Kerio MailServer versions 6.7.2 and 6.7.3, and all recent versions of Kerio Connect, are known to be fully compatible with the most recent versions of ClamAV.

Installation

 * You may simply emerge the latest version of and configure it according to your needs.
 * Please remember to exclude, within the ClamAV configuration file, your mailstore directory or you may experience many issues including a hefty degradation in performance.

NOD32 Anti-Virus
ESET Mail Security for Kerio Connect, offers advanced heuristics detection and cleaning via its ThreatSense® engine. More information on setting up NOD32 with Kerio Connect can be found on the Kerio Knowledgebase.

Sophos® SAVI
Sophos Anti-Virus Engine (SAVI) requires no additional configuration for Kerio Connect beyond enabling it in the Administration GUI. In addition to activating the SAVI engine, you may also activate an additional, third-party anti-virus engine if you wish that will run in conjunction with it. Please see the Sophos website for additional information on the SAVI engine.

ASSP
The Anti-Spam-SMTP-Proxy service is an excellent, open source alternative to Kerio Connect's built-in spam filtering implementation and offers a host of features, many of which are not found in Kerio Connect. While ASSP acts as a transparent SMTP filtering proxy, it's also capable of scanning incoming and outgoing mail using the ClamAV anti-virus program along-side any other local anti-virus scanning program you may have installed. A brief list of ASSP's features:


 * Easy (optional) browser-based setup.
 * Native SSL-support. Works even if your MTA doesn't support it.
 * Resending of blocked email to the original recipients.
 * Improved HELO handling.
 * Individual weighting of different DNSBL lists.
 * Community based grey IP list, Senderbase, SPF, DKIM support even if your MTA doesn't support it.
 * Automatic whitelisting - emails generated by users on the server will never be blocked.
 * Makes use of honeypot type spambucket addresses to automatically recognize spam and update your spam database.
 * Bayesian filter intelligently classifies email into spam and non-spam.
 * Active user community and email list for support questions.
 * Source code included if you need to customize your installation.
 * Can block spam-bombs (when spammers forge your domain in the from field) and fake Bounces.

You may try the outdated and no longer maintained version of ASSP in portage via emerging the package. Or for more current and updated features you may simply compile ASSP from source. Installation is very simple either way.

Credits
This article and its contents were made possible by the contributions of the following people/groups:
 * drfli - For his init.d script example on the official Kerio forums.
 * Kerio Technologies Inc. - For the amazing product this article was written for.