Basic Steps
We are going to:
1. Download the latest version of Roundcube Webmail
2. Create a directory for Roundcube
3. unzip the download and copy to the new directory
4. set up Postgres ( the OS X default database) for Roundcube
5. Alter the Roundcube config files to allow access
6. Configure a httpd redirect file so that you can access webmail
7. Create a webapp plist file to allow selection of Roundcube for any site that you have defined in your "Websites" including the default or wiki site.
Step 1. Downloading Roundcube webmail
Get the latest version from http://roundcube.net/download
Note - the current version as at writing is 0.8.2
This will download to your "Downloads" folder (/Users/<username>/Downloads/roundcubemail-0.8.2.tar.gz)
Open Launchpad
Next, we are going to need the Terminal app for some command line work.
Make sure you are logged in as an Administrator-level account
Open Launchpad from your dock

Terminal
type "terminal" and hit "Enter"

Steps 2. and 3. - Create a Directory and unzip to that directory
You can copy these lines and paste direct to your terminal session if you want.
The "sudo" command means "do what follows as a superuser" - it will ask for the admin password for your account
Note that the "|" in the gunzip command between the "0.8.2.tar.gz" and "tar xopf -" is the "bar or pipe" character located on the "Backslash" key on a standard Mac keyboard "Shift \"
In Terminal at the "$" prompt - type:
sudo mkdir -p /opt/webapps/rcwebmail
cd ~/downloads
gunzip -c roundcubemail-0.8.2.tar.gz | tar xopf -
sudo mv roundcubemail-0.8.2/* /opt/webapps/rcwebmail'
cd /opt/webapps/rcwebmail
Step 4. Postgres setup
Still in Terminal - type:
sudo createuser -U _postgres -d -s roundcube
sudo createdb -U _postgres -O roundcube -E UNICODE rcwebmail
sudo psql -U roundcube -d rcwebmail
And you'll see:

Step 4. continued
At the "rcwebmail=>" prompt type the following substituting the password that you want within the single quotes:
ALTER ROLE roundcube WITH PASSWORD 'the_new_password'
\c - roundcube
\i /opt/webapps/rcwebmail/SQL/postgres.initial.sql
\q
You sould see a bunch of SQL commands after the \i /opt/webapps.rcwebmail/SQL/postgres.initial.sql step
and following the \q , you should be back at the command prompt in the \opt\webapps\rcwebmail directory.

Step 5 - Roundcube Setup - Database Connect
Still in Terminal :
cd /opt/webapps/rcwebmail
sudo cp db.inc.php.dist db.inc.php
sudo nano db.inc.php
And you'll see this screen below.
Use the arrow keys to move the cursor to the marked line and change
'mysql://roundcube:pass@localhost/roundcube'
to (inserting the new password that you entered above)
'pgsql://roundcube:your_new_password@127.0.0.1/rcwebmail'
Then type:
Ctrl-x (control and "x" key at same time)
y
Press "Return" Key
Step 5. Continued - Roundube Config Setup
Still in Terminal type:
sudo cp main.inc.php.dist main.inc.php
Ctrl-w (Ctrl key asnd "w" at same time")
default_host
and change the line
$rcmail_config['default_host'] = '';
to
rcmail_config['default_host'] = 'tls://127.0.0.1/';
and 7 lines below .....
$rcmail_config['imap_auth_type'] = null;
to
$rcmail_config['imap_auth_type'] = CRAM_MD5;
Then to exit the nano editor
Ctrl-x
y
"Return"
Step 6. Create an apache redirect file for Roundcube
Still in terminal
cd /opt/webapps/webmail
sudo nano httpd_rcwebmail.conf
Enter these lines and edit as you want!
Alias /webmail "/opt/webapps/rcwebmail/"
Alias /Webmail "/opt/webapps/rcwebmail/"
Alias /WebMail "/opt/webapps/rcwebmail/"
Requestheader set x-apple-service-webmail-enabled true
<Directory "/opt/webapps/rcwebmail/">
Options -Indexes FollowSymLinks
</Directory>
Ctrl-x
y
"Return"
Step 7. Create a webapp for Roundcube Mail
Still in Terminal
cd /Library/Server/Web/Config/apache2/webapps/
sudo nano org.yourdomain.webapps.rcwebmail.plist
Again - enter the following and change the org.yourdomain to whatever yours is!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>org.yourdomain.rcwebmail</string>
<key>displayName</key>
<string>"RoundCube Webmail</string>
<key>proxies</key>
<dict/>
<key>includeFiles</key>
<array>
<string>/opt/webapps/webmail/httpd_rcwebmail.conf</string>
</array>
<key>installationIndicatorFilePath</key>
<string>/opt/webapps/webmail/httpd_rcwebmail.conf</string>
</dict>
</plist>
Ctrl-x
y
"Return"
Start Server.app and add Roundcube Webmail to your default site
Startup Server.app and follow the screenshots to enable.
You will then be able to access webmail (with the appropriate dns records in place!) via
http://yourserver.yourdomain.com/webmail (or WebMail or Webmail - whatever aliases you added in the httpd_rcwebmail.conf file)
or
http://yourserver.local/webmail
Cheers
Tick Webmail
Tick Roundcube Webmail






