A standard install of Virtualmin sets up the Dovecot server, which allows users to access their email via IMAP or POP3 from desktop clients like Outlook or Thunderbird, or mobile devices like the iPhone or Treo. However, many users prefer to access their email via a browser-based user interface, which can be used from any desktop without the need to install software.
For this reason, Virtualmin comes with the Usermin webmail interface, pre-configured to allow domain owners and mailbox users access to their email. It can also configure mail filtering, change passwords and manage folders. Alternately, you can use one of the popular PHP webmail applications like Squirrelmail or Roundcube, both of which are installable by Virtualmin.
If Virtualmin was installed using the Pro or GPL install.sh script, Usermin can be accessed via the URL https://www.example.com:20000/ , where example.com is a virtual server hosted on your system. Mail users can login with either their email address (like joe@example.com), short names (like just joe), or full usernames (like joe.example).
After logging in, users should see a list of folders on the left menu, and the contents of their inbox on the right. The Search box on the left performs a quick search of the currently selected folder. The links below it are for managing folders and preferences, changing your password, and setting up email forwarding (if allowed).
By default, Usermin's webmail interface connects to the IMAP server on the same system to access mailboxes, so for it to work Dovecot must be running and properly configured. If you prefer to have it access mail files directly, this can be configured in Virtualmin as follows :
Configuring forwarding is only possible if the system is setup to allow users to run their own .procmailrc files. This can be enabled as follows :
Both these webmail applications are written in PHP, and thus can be installed into any virtual server on your system using Virtualmin's script installers feature. Once active, users can navigate to a URL like http://www.example.com/squirrelmail/ and login with their IMAP username and password to access folders and mail files.
To install either, the steps to follow are :
Squirrelmail has been under development for much longer than Roundcube, and has an extensive set of plugins available. However, Roundcube has a nicer looking user interface and makes use of modern web features like AJAX to improve the user experience.
Instead of installing one of these webmail applications in each domain separately, you can create a virtual server like webmail.yourcompany.com and the install one of them there, ideally at the top level instead of under a sub-directory. This has the advantage of reducing the amount of disk space consumed by Squirrelmail installs, makes it easier to upgrade, and allows SSL access with a valid certificate for the domain.
To setup SSL access to webmail with a certificate that matches to domain name, you could do the following :
Users will now be able to access https://webmail.yourcompany.com/ with no SSL warnings, and thus better security.
Starting from Virtualmin 3.60, all new domains created will have a webmail DNS entry which when accessed via a URL like http://webmail.example.com/ redirects the browser to Usermin on the same domain. This provides a more friendly URL to users, so that they don't have to remember something port 20000 in it.
The redirect URL can be customized to forward to either another webmail application on the same domain (like Squirrelmail), or a central domain for all users of your system. The latter option has the advantage that a valid signed SSL certificate can be used, as explained above.
To change the redirect URL, do the following :
root, open the System Settings category on the left menu and click on Server Templates.${DOM} in the URL.
Domains created from now on will use this redirection URL. To apply the setting to all existing domains, SSH into the system as root, and run the commands :
virtualmin modify-web --all-domains --no-webmail virtualmin modify-web --all-domains --webmail