Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

RoundCube installation
 
 
Introduction
Since RoundCube 0.2.0-stable, PHP 5.2.0+ is required. It almost works fine with PHP 5.1 (RHEL5). We're only experiencing troubles with the 'Display message in HTML' feature.
 
 
Installation
Make sure you've got those packages installed,
rpm -q \
httpd \
mysql-server \
php \
php-mysql \
php-pecl-Fileinfo \
php-mcrypt \
php-xml
 
Download (http://roundcube.net/downloads or http://nightly.roundcube.net/trunk/), extract and deploy,
wget http://nightly.roundcube.net/trunk/roundcubemail-trunk-r2907-20090901.tgz
tar xvzf roundcubemail-trunk-r2907-20090901.tgz
mv roundcubemail-trunk-r2907-20090901 /var/www/webmail.example.net
cd /var/www/webmail.example.net
touch favicon.ico
chown -R nobody:nobody .
chown -R apache:apache temp
rm -rf logs
Note. "robots.txt" is provided by RoundCube
Note. we're using syslog
 
Configure the virtual host,
vi /etc/httpd/conf.d/vhost.conf
add this,
<VirtualHost *:80>
ServerName webmail.example.net
DocumentRoot /home/www/webmail.example.net
CustomLog /var/log/httpd/webmail.example.net_access.log combined
ErrorLog /var/log/httpd/webmail.example.net_error.log
<Directory "/home/www/webmail.example.net">
AllowOverride All
</Directory>
</VirtualHost>
apply,
service httpd reload
 
Create a MySQL database and user (e.g. with phpMyAdmin http://www.phpmyadmin.net/).
 
Point your browser to the installer and proceed,
http: //webmail.example.net/installer/
note. on RHEL5 servers you will have to hack this one,
cd installer
cp check.php check.php.dist
vi check.php
change,
define('MIN_PHP_VERSION', '5.1.6');
note. you will have to configure PHP to load fileinfo, mcrypt and gd,
vi /etc/php.ini
note. you may setup a timezone,
vi .htaccess
add,
php_value date.timezone Europe/Paris
 
During installation,
General configuration > check "Check client IP in session authorization"
General configuration > identites_level : many identities with possibly to edit all params but not email address
Logging & Debugging > debug_level : also check "Print errors (to the browser)"
Logging & Debugging > log_driver : syslog
Database setup > ...
Language : fr_FR
IMAP server : ...  
save the configurations (copy/paste),
cd config
vi main.inc.php.paste
vi db.inc.php.paste
sed '/\/\*/,/*\//d; /^\/\//d; /^$/d;' main.inc.php.paste > main.inc.php
vi main.php.inc
eventually change those lines,
$rcmail_config['default_host'] = 'localhost';
$rcmail_config['language'] = 'fr_FR';
$rcmail_config['create_default_folders'] = true;
$rcmail_config['protect_default_folders'] = false;
$rcmail_config['default_charset'] = 'ISO-8859-1';
$rcmail_config['list_cols'] = array('from', 'subject', 'date', 'attachment');
$rcmail_config['preview_pane'] = true;
$rcmail_config['preview_pane_vertical'] = true;
continue,
Initialize database
remove the installer and reapply the perms just in case,
rm -rf installer
chown -R nobody:nobody .
chown -R apache:apache temp
 
 
Migration
When you migrate the mails from one host to another, RoundCube will try to insert them in the cache again, hence the "MDB2 Error: constraint violation Query" error. Connect to the roundcube database and flush the cache,
mysql -uroot -p
show databases;
use DBNAME
truncate messages;
truncate cache;
Note. $rcmail_config['enable_caching'] = TRUE;
 
 
Upgrade
Backup the db,
cd ~/
mysqldump -uroot -p DBNAME > DBNAME.sql
backup the roundcube web folder,
cd /var/www/vhosts
tar czf mail.example.net.tar.gz mail.example.net
backup the config files,
cd mail.example.net
cp config/db.inc.php ~/
cp config/main.inc.php ~/
 
Download (http://www.roundcube.net/?p=downloads) and extract the new RoundCube version,
cd path/to
wget ...
tar xzf roundcubemail-0.3-stable.tar.gz
 
Replace the old folder with the new version,
cd /var/www/vhosts
mv mail.example.net mail.example.net.old
mv path/to/roundcubemail-0.3-stable mail.example.net
chown -R nobody:nobody mail.example.net
chown -R apache:apache mail.example.net/temp
cd mail.example.net/config
check the new configs,
diff -u ../../mail.example.net.old/config/main.inc.php.dist main.inc.php.dist
diff -u ../../mail.example.net.old/config/db.inc.php.dist db.inc.php.dist
sed '/\/\*/,/*\//d; /^\/\//d; /^$/d;' main.inc.php.dist > main.inc.php
vi main.inc.php
cp /root/db.inc.php .
cd ..
 
Check if you need to update the db,
find . | grep .sql$
grep Updates SQL/mysql.update.sql
#vi SQL/mysql.update.sql
#mysql -uroot -p DBNAME < SQL/mysql.update.sql
 
Clean up,
rm -f /root/db.inc.php
rm -f /root/main.inc.php
rm path/to/roundcubemail-*.tar.gz
 
Ref. http://trac.roundcube.net/wiki/Howto_Upgrade
 
 
Design customization
You may want to place your company's logo instead or beside RoundCube's logo. On home page, mail listing and error pages,
cd skins/default/templates
vi login.html
vi error.html
vi printmessage.html
Note. as for 'login.html', eventually center the logo,
#<div style="text-align:center;">
#</div>
 
For your smaller logo on various pages,
cd skins/default/includes/
vi header.html
 
 
(FR) Configuration utilisateur
Personnaliser votre webmail,
  Préférences > onglet Identités
  sélectionner l'identitée > Nom à afficher : ...
  sélectionner l'identitée > Signature : ...
 
  Préférences > onglet Dossiers
  abonnez vous à tous les dossiers
 
  Préférences > onglet Préférences
Interface utilisateur > Langue : French (Français)
Interface utilisateur > Fuseau horaire : Automatique
Interface utilisateur > Heure d'été
Interface utilisateur > Nombre de lignes par page : 50 (bcp plus rapide à charger...)
Interface utilisateur > Use message index for sorting by date (sinon les mails ne sont pas dans l'ordre d'arrivée)
Vue du courrier > Notifications à l'expéditeur : ignorer
Vue du courrier > Chercher les nouveaux messages : toutes les 3 minutes
Vue du courrier > Vérifier tous les dossiers pour les nouveaux messages
Affichage des messages > Afficher en HTML
Affichage des messages > Afficher les images distantes : venant d'expéditeurs connus
Affichage des messages > After message delete/move display the next message
Préférences du serveur > Marquer le message comme lu à la suppression
 
N.B. si vous n'utiliser la corbeille que pour les spams ou autres mails à supprimer définitivement,
  Préférences du serveur > Vider la corbeille à la déconnexion
 
 
Todo
Configure signature above quotes.
 
 
Themes (skins)
http://www.roundcubethemes.net/
 
 
References
RoundCube webmail project : http://roundcube.net/
Howto_Install : http://trac.roundcube.net/wiki/Howto_Install
Howto_Config : http://trac.roundcube.net/wiki/Howto_Config
HOWTO: Install Roundcube Webmail from SVN (was CVS) on FreeBSD : http://fak3r.com/2005/11/15/howto-install-roundcube-webmail-from-svn-was-cvs-on-freebsd/
 

(obsolete, see the new doc)