IRedMail/FAQ/Upgrade.Roundcube.Webmail

From iRedMail
Jump to: navigation, search

Contents



WARNING: There's a zero day vulnerability found in Roundcubemail-0.8.5 and older releases, please upgrade your running Roundcube webmail to the latest roundcubemail-0.8.6 immediately.


This tutorial is used to upgrade Roundcube from old release to the latest release. Ideally, you can upgrade whichever old release to the latest Roundcube release with this tutorial. Post issues in our online support forum: http://www.iredmail.org/forum/

Backup current Roundcube webmail database

We must backup current Roundcube database before we go further.

Terminal:
#
# ---- For MySQL backend
#
# mysqldump -u root -p roundcubemail > /root/mysql-db-roundcubemail.sql

#
# ---- For PostgreSQL backend
#
# su - postgres
# pg_dump roundcubemail > ~/db-roundcubemail.sql

Upgrade Roundcube webmail

  • Download the latest Roundcube webmail here: http://roundcube.net/. Here we take 0.8.6 for example: /root/roundcubemail-0.8.6.tar.gz
  • Extract it in the right place.
Terminal:
# ---- For RHEL/CentOS/Scientific Linux ----
# tar xzf /root/roundcubemail-0.8.6.tar.gz -C /var/www/
# cd /var/www/
# mkdir roundcubemail-0.8.6/{temp,logs}
# chown -R apache:apache roundcubemail-0.8.6

# ---- For Debian/Ubuntu ----
# tar xzf /root/roundcubemail-0.8.6.tar.gz -C /usr/share/apache2/
# cd /usr/share/apache2/
# mkdir roundcubemail-0.8.6/{temp,logs}
# chown -R www-data:www-data roundcubemail-0.8.6

# ---- For Gentoo Linux ----
# tar xzf /root/roundcubemail-0.8.6.tar.gz -C /var/www/
# cd /var/www/
# mkdir roundcubemail-0.8.6/{temp,logs}
# chown -R apache:apache roundcubemail-0.8.6

# ---- For openSUSE ----
# tar xzf /root/roundcubemail-0.8.6.tar.gz -C /srv/www/
# cd /srv/www/
# mkdir roundcubemail-0.8.6/{temp,logs}
# chown -R wwwrun:www roundcubemail-0.8.6

# ---- For FreeBSD ----
# tar xzf /root/roundcubemail-0.8.6.tar.gz -C /usr/local/www/
# cd /usr/local/www/
# mkdir roundcubemail-0.8.6/{temp,logs}
# chown -R www:www roundcubemail-0.8.6
  • Sync settings in config files roundcubemail-0.8.6/config/db.inc.php and roundcubemail-0.8.6/config/main.inc.php from old release.
    • New version of Roundcube may add new config options, so it's not recommended to simply copy old config files.
  • Set correct time zone in your PHP config file php.ini. For example:
    • On RHEL/CentOS/Scientific Linux, it's /etc/php.ini
    • On Debian/Ubuntu, it's /etc/php5/apache2/php.ini
    • On Gentoo Linux, it's /etc/php/apache2-php5.3/php.ini
    • On openSUSE, it's /etc/php5/apache2/php.ini
    • on FreeBSD, it's /usr/local/etc/php.ini
Terminal:
date.timezone = "Europe/Paris"
  • Upgrade Roundcube database structure by importing shipped SQL file. NOTE: It upgrades SQL structure from Roundcubemail-0.1, so it will report many error messages. but it's OK to ignore them all.
Terminal:
#
# ---- For MySQL backend
#
# mysql -uroot -p
mysql> USE roundcubemail;
mysql> SOURCE roundcubemail-0.8.6/SQL/mysql.update.sql;

#
# ---- For PostgreSQL backend
#
# su - postgres
$ psql -d roundcubemail
sql> \i /var/www/roundcubemail-0.8.6/SQL/postgres.update.sql;
  • Now you need to sync config files for Roundcube plugins. iRedMail enables two plugins by default, you can check file roundcubemail-[OLD_VERSION]/config/main.inc.php to see whether you have addition plugins enabled. For example:
    • roundcubemail-0.8.6/plugins/password/: Used to allow mail users to change their own passwords. Config file is roundcubemail-0.8.6/plugins/password/config.inc.php.
    • roundcubemail-0.8.6/plugins/managesieve/: Used to allow mail users to manage their own mail filter rules. Config file is roundcubemail-0.8.6/plugins/managesieve/config.inc.php.
File: roundcubemail-[OLD_VERSION]/config/main.inc.php
$rcmail_config['plugins'] = array("password", "managesieve");

Please sync plugin settings between new Rondcubewebmail release and old one.

  • Sync settings in roundcubemail-0.8.6/.htaccess with old version. Some php settings could become required.
  • If you're using build-in addressbook, run indexing script roundcubemail-0.8.6/bin/indexcontacts.sh:
Terminal:
# cd roundcubemail-0.8.6/
# chmod +x bin/indexcontacts.sh
# ./bin/indexcontacts.sh
  • Restrict accessing to sensitive files:
Terminal:
# chmod 0000 roundcubemail-0.8.6/{CHANGELOG,INSTALL,LICENSE,README,UPGRADING,installer,SQL}
  • Remove symbol link and create a new one, link to new release:
Terminal:
# rm roundcubemail
# ln -s roundcubemail-0.8.6 roundcubemail

That's all, restarting Apache service is required.

Note: Please track Roundcube log file to see whether there's missing PHP modules, you should install missed ones manually.

References

Personal tools