To allow you and your users to access their email2 from anywhere you can install this webmail2 client Roundcube. It’s a very user friendly and usable web based mail2 program, it’s got some ajax goodness and will allow for instance drag and drop mail2s into their IMAP folders. Please note that to fully benefit from a webmail2 client your users should use the IMAP capabilities of your server. Which means that all their email2 is stored on the server and stays accessible.

You need to download the latest code from the Roundcube site.

Extract the archive into the Document root of your Apache installation, in our case /Library/WebServer/Documents.

To be able to install new versions and to migrate easily we setup a symbolic link to the current roundcube directory which we can change when a new vrsion arrives.

sudo ln -s /Library/WebServer/Documents/roundcubemail2-0.xxxx /Library/WebServer/Documents/roundcubemail2

Step into the newly created directory and change the permissions on the temp and logs directory so that the webserver can write into these directories with the following commands:

chown -R www:www temp
chown -R www:www logs

Next we need to create a database for Roundcube to use. Start up MySQL on the command line and issue the following commands in MySQL:

CREATE DATABASE roundcubemail2 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON roundcubemail2.* TO roundcube@localhost

Note: Change the PASSWORD into any password you would like to use, remember it as you need to put it in the configuration file later.

The next step is a lot simpeler since version 0.2 roundcube comes equiped with a proper installer. Point your browser to http://yourhostname/roundcubemail2/installer/ and follow the instructions.

In step 2 you are asked some questions, these might be your answers to the important questions:

Database setup:
PASSWORD (the same as used above)
IMAP Settings:

The rest is up to your discretion.

If the installer was unable to create the config files you need to copy the contents located in the browser in the files and located in the directory config

If you’ve done all this your done with the configuration of Roundcube. If you have tested the setup and it works please remove the installer directory from the roundcube installation. It might be used by others to hack your installation.

I like to use a subdomains to divide up the specific tasks my webserver does. I use to allow users to access their mail2. How you can set this up as well is documented here.

If you’ve done that or just used a local directory to use, point your browser to http://webmail2.yourdomain.tld or http://yourdomain.tld/roudcube and you should see a login screen appear.

For errors you could check the logfiles to explain what went wrong. For Roundcube errors check the /logs/errors file and for general mail2 errors check the /var/log/mail2.log file.