We chose RoundCube after trying a bunch of other webmail applications. Here are some that we tried:
First, install the prerequisites (and their dependencies):
sudo yum install -y php53-gd php53-intl php53-mbstring php53-xml
Next, create the directory to store the program in:
SITE=webmail.sluug.org APACHE_USER=apache sudo mkdir /srv/www/$SITE sudo chown -R $APACHE_USER:$APACHE_USER /srv/www/$SITE sudo chmod g+s /srv/www/$SITE
Get the latest version of the RoundCube code from the Subversion repository:
cd /srv/www/$SITE sudo svn checkout --trust-server-cert --non-interactive https://svn.roundcube.net/trunk . ;# Accept the certificate. sudo rm -f public sudo ln -s roundcubemail public sudo chmod ug+w roundcubemail/logs roundcubemail/temp sudo chown -R $APACHE_USER:$APACHE_USER roundcubemail
Prepare the MySQL database. Be sure to save the username and password in the /root/.my.cnf
file. (Use the real password and username below.)
PASSWORD=$PASSWORD USER=$USER sudo -H mysql <<EOF CREATE DATABASE roundcube; GRANT ALL PRIVILEGES ON roundcube.* TO $USER@localhost IDENTIFIED BY '$PASSWORD'; FLUSH PRIVILEGES; EOF
Make sure there's an Apache configuration for the site, and reload the Apache config if necessary.
Browse to http://webmail.sluug.org/installer/
.
START INSTALLATION
button.NEXT
.General Configuration
:Database Setup
:IMAP Settings
:SMTP Settings
:Display settings & user prefs
:CREATE CONFIG
button.download
links don't work (they give a default config, not the one you just built); you'll have to cut and paste./srv/www/webmail.sluug.org/roundcubemail/config/
with names of main.inc.php
and db.inc.php
CONTINUE
button.NOT OK (Database not initialized)
Initialize database
button.OK
, along with DB Write and DB Time.Test SMTP config
section.Send test email
button.SMTP send: OK
.Test IMAP config
section.Check login
.IMAP connect: OK
.
Additional configuration can be done in the /srv/www/webmail.sluug.org/roundecubemail/config/main.inc.php
file.
Remove the installation directory and some other files that are not needed:
cd /srv/www/webmail.sluug.org/public sudo rm -rf installer/ README INSTALL UPGRADING LICENSE CHANGELOG
NOTE: It is highly recommended to ensure that nobody is logged into the webmail system when upgrading.
First, make a backup of the current version, just in case.
cd /srv/www/webmail.sluug.org sudo cp -a roundcubemail roundcubemail.backup-`date +'%Y%m%d'`
Since we're using Subversion to download the code, we can simply pull the latest revision. First, check the current revision info:
cd /srv/www/webmail.sluug.org svn info
Then update to the latest revision:
cd /srv/www/webmail.sluug.org sudo svn up svn info
Check the config files, to add any new parameters:
cd /srv/www/webmail.sluug.org diff -u roundcubemail/config/db.inc.php roundcubemail/config/db.inc.php.dist diff -u roundcubemail/config/main.inc.php roundcubemail/config/main.inc.php.dist
Change anything necessary in the config files, then check the installation by browsing to /installer/
.
Once everything checks out, remove the unnecessary files again:
cd /srv/www/webmail.sluug.org/public sudo rm -rf installer/ README INSTALL UPGRADING LICENSE CHANGELOG
Browse to http://webmail.sluug.org/
.
Log in with credentials against the IMAP(S) server.
Use PostgreSQL instead of MySQL.
Install PHP FileInfo package, which is optional, but recommended.
Consider configuring the logging differently.