====== Webmail ====== We chose [[http://roundcube.net | RoundCube]] after trying a bunch of other webmail applications. Here are some that we tried: * Bongo (formerly Hula) - could not get it to install * SquirrelMail - old UI is hard to work with * Horde (IMP) - complicated setup, does too much * Zimbra - too integrated with email servers ===== Installation ===== 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 < Make sure there's an Apache configuration for the site, and reload the Apache config if necessary. ===== Configuration ===== Browse to ''http://webmail.sluug.org/installer/''. * Click ''START INSTALLATION'' button. * Make sure all the requirements are met. Try to enable as many of the optional items as well. * Click ''NEXT''. * In ''General Configuration'': * product_name = SLUUG Webmail * CHECK ip_check * CHECK Cache messages in local database * In ''Database Setup'': * Database name = roundcube * Database user = $USER from above * Database password = $PASSWORD from above * In ''IMAP Settings'': * default_host = ssl:/\/sluug.org * port = 993 (for IMAPS) * username_domain = sluug.org * CHECK auto_create_user (allows automatic use for any IMAP user on our system) * In ''SMTP Settings'': * smtp_server = localhost * smtp_port = 25 * smtp_user/smtp_pass = (blank) * In ''Display settings & user prefs'': * pagesize = 12 * UNCHECK prefer_html * CHECK preview_pane * draft_autosave = 3 min * Click on ''CREATE CONFIG'' button. * Save the 2 config files. * Note that the ''download'' links don't work (they give a default config, not the one you just built); you'll have to cut and paste. * Save the files in ''/srv/www/webmail.sluug.org/roundcubemail/config/'' with names of ''main.inc.php'' and ''db.inc.php'' * Hit the ''CONTINUE'' button. * The next page will test the config to see if everything is OK. * The DB Schema will show as ''NOT OK (Database not initialized)'' * Click on the ''Initialize database'' button. * Now the DB Schema should show as ''OK'', along with DB Write and DB Time. * Next, skip down to the ''Test SMTP config'' section. * Enter a sender and recipient, then click the ''Send test email'' button. * The page should come back with ''SMTP send: OK''. * Next, skip down to the ''Test IMAP config'' section. * Enter login info for an account on the IMAP server and click ''Check login''. * The page should come back with ''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 ===== Upgrading ===== **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 ===== Usage ===== Browse to ''http://webmail.sluug.org/''. Log in with credentials against the IMAP(S) server. ===== TODO ===== Use PostgreSQL instead of MySQL. Install PHP FileInfo package, which is optional, but recommended. Consider configuring the logging differently.