Complete Virtual Mail Server/Web Access

Introduction
There are many webmail solutions out there. The of the most popular ones are in Gentoo,, and. The most feature full and complex is the horde suite of web-apps. The most basic is squirrelmail. For only webmail access, roundcube is probably the most suitable one. It is a feature rich webmail client using ajax.

For the installation of the webapps there are two options available. The first would be no using the for the webapps and thus only have one webmail installation. Although this can work quite well, users log in by their unique username or email address, it may be desired to say, have a dedicated look & feel per domain, or have the webmail hosted per domain. Even though it could be an option redirect the various domain to one host. The second is slightly more involved, but allows for each domain to have their own set of webapps.

Squirrelmail
Squirrelmail is a simple and basic webmail interface it can be installed alongside other webmail applications without to much trouble.

Installation
Installing squirrelmail is a two step process. First, it needs to be emerged.

After it has been emerged, it needs to be installed to each of the virtual webhosts. Assuming apache has been setup properly to serve ''webmail.example.com' from squirellmail can be installed there using. It is nearly always a good idea to install the webapp in it's own subdirectory and later redirecting to that subdirectory, then installing the webapp to the webroot.

Configuration
Once installed there are two ways to configure squirrelmail. Edit a set of config files, which webapp-config's --show-postinst option should have printed, or run the configuration script. There are many options in the configuration menu. The key parameters that need to be changed however are under the Server Settings.

Configuring Squirrelmail - Main Menu Under the server settings the IMAP and SMTP settings can be setup. Configuring Squirrelmail - Server Settings The default settings autodetect the used configuration of the mail server. Since the settings are known, it is faster when they are properly setup. Configuring Squirrelmail - IMAP Settings Also the default SMTP settings are acceptable. Configuring Squirrelmail - SMTP Settings

With Squirrelmail working, it is recommended to check other options and plugins to tune squirrelmail. For example enabling the show_ssl_link plugin to offer users to go to the https version, or better yet, secure_login that redirects squirrelmail to he https version.

Squirrelmail themes
Squirrelmail includes a handful of themes already and are usable by the user upon installation.

Roundcube
Roundcube is a fine and rich webapplication, which does take some time to properly setup.

Installation
Installing roundcube is a two step process. First, it needs to be emerged.

After it has been emerged, it needs to be installed to each of the virtual webhosts. Assuming apache has been setup properly to serve webmail.example.com from roundcube can be installed there using. It is nearly always a good idea to install the webapp in it's own subdirectory and later redirecting to that subdirectory, then installing the webapp to the webroot.

Database Configuration
Webapp's installer will directly point out that roundcube requires a database. Isolating a database pure for roundcube's is therefor what is best done. Also this database should only be accessible by a special user designated for roundcube. It should be noted, that several domains can use the same database without getting in each others way as only user things are stored in there. Roundcube could theoretically even use the postfix database.

PostgreSQL
First, a user is created without any rights is created.

Then a database owned by roundcube is created.

And finally the template is imported.

MySQL
MySQL handles it all internally.

Finish up by importing the SQL template.

Roundcube configuration
Roundcube does not have a frontend to configure it. There are some configuration files however that need editing. Most noteably to setup database access.

The main configuration file,, contains more options then are necessary, so browsing through it and adjusting it is recommended once everything is in place and functioning. As with roundcube, it is recommended to use encrypted connections, and local caching ($rcmail_config['enable_caching'] &#61; TRUE;), when the IMAP, SMTP and webmail server are not on the same host.

After roundcube is functioning as desired, the debug_level should be reduced again and the logging facility can be changed from file logging to syslog-logging. It is also strongly recommended to enable roundcube to force https. It will always open the https version of roundcube.

PHP Configuration
Roundcube requires a few parameters to be set correctly in the configuration file.

Apache Configuration
Roundcube uses .htaccess files to protect certail directories. The Limit directives need to be allowed to overridden. This needs to be done on a vhost base.

Roundcube themes
Roundcube offers the ability to install user selectable themes. Its themeing, or skins as they are called by roundcube, is as simple as dropping a theme into the directory on the server.