I’ve got the server running for some days now and I must say it’s handling the load quit well. The only thing I had trouble with migrating easily was the squirrel webmail program, it had some problems with the include path and I didn’t feel like re-installing it. I’ve received emails from people saying that I should use Roundcube for web based email, not getting squirrel to run was the perfect excuse I needed to try and install it.

It didn’t look to complicated and it turned out to be one of the easier installs on the server. This is what I had to do to get it working:

First you need to download the code from the Roundcube site, I’ve used roundcube_webmail_0.1-20051021.tar.gz.

Extract the archive into the directory /Library/Apache2/htdocs (if you have the Apache installation from Server Logistics like I did and documented).

Step into the directory roundcubemail-0.1-20051021 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 roundcubemail;
GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
quit


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.

Next we need to create the database structure (tables and such), luckily a script to create all this has been included in the archive. You need to execute the following command to import the script into the database:

mysql -p roundcubemail <sql/mysql.initial.sql

Next step is modifying the configuration of Roundcube to reflect your situation. Step into the directory config and we will first edit the database connection. Edit the file db.inc.php and change the password in the following line with the password you used earlier:

rcmail_config['db_dsnw'] = 'mysql://roundcube:PASSWORD@localhost/roundcubemail';

Next file to edit is the main.inc.php and change the following lines:

$rcmail_config['enable_caching'] = FALSE;

Define the host as localhost

$rcmail_config['default_host'] = 'localhost';

But if you use IMAP over SSL as I do you need to use:

$rcmail_config['default_host'] = 'ssl://localhost:993';

If you’ve changed these lines your done with the configuration of Roundcube.

I like to use a subdomains to divide up the specific tasks my webserver does. I use http://webmail.richard5.net to allow users to access their mail. (Mental note: still need to provide SSL support for this). How you can set this up as well is as follows:

Go into /Library/Apache2/conf and edit the httpd.conf file. Uncomment the following line:

NameVirtualHost *:80

and add the following beneath it:


ServerAdmin webmaster@yourdomain.tld
DocumentRoot /Library/Apache2/htdocs/roundcubemail-0.1-20051021/
ServerName webmail.yourdomain.tld
ErrorLog logs/webmail-error_log
CustomLog logs/webmail-access_log combined

Then restart Apache by issuing the command:

/Library/Apache2/bin/apachectl restart

Point your browser to http://webmail.yourdomain.tld 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 /Library/Apache2/htdocs/roundcubemail-0.1-20051021/logs/errors file and for general mail errors check the /var/log/mail.log file.

Hope you enjoy Roundcube as much as I do…