Upgrade iRedMail from 0.9.6 to 0.9.7

Warning

THIS IS A DRAFT, DO NOT APPLY ANY STEPS MENTIONED IN THIS TUTORIAL.

Paid Remote Upgrade Support

We offer remote upgrade support if you don't want to get your hands dirty, check the details and contact us.

ChangeLog

General (All backends should apply these steps)

Update /etc/iredmail-release with new iRedMail version number

iRedMail stores the release version in /etc/iredmail-release after installation, it's recommended to update this file after you upgraded iRedMail, so that you can know which version of iRedMail you're running. For example:

0.9.7

Upgrade Roundcube webmail to the latest stable release (1.2.4)

Roundcube 1.2.4 fixes a security issue, all users are encouraged to upgrade it as soon as possible. For more details about this release, please check Roundcube release note.

Please follow Roundcube official tutorial to upgrade Roundcube webmail to the latest stable release immediately:

Fixed: incorrect session.save_path in php-fpm pool config file on RHEL/CentOS

Attention

This is applicable to RHEL/CentOS system, and Nginx web server.

iRedMail-0.9.6 doesn't set path for session.save_path parameter in php-fpm pool config file /etc/php-fpm.d/www.conf, please fix it with steps below:

php_value[session.save_path] = "/var/lib/php/session"
php_value[session.save_path] = "/var/lib/php/sessions"
service php-fpm restart

Fixed: Improper Fail2ban filter which causes incorrect ban

Please open file /etc/fail2ban/filter.d/dovecot.iredmail.conf, remove line below:

            \(no auth attempts in .* rip=<HOST>

Then restart or reload Fail2ban service.

NEW: New backup script for SOGo

Attention

This is not applicable to SOGo-2.x because it doesn't support backing up all users' data with command sogo-tool backup /path/to/backup/dir ALL.

iRedMail has script /var/vmail/backup/backup_mysql.sh (or backup_pgsql.sh) to backup SOGo database by dumping whole database to a plain SQL file as backup. It's not ideal because:

This new script does backup with sogo-tool backup command to avoid issues mentioned above, you can restore a single user's data or all users data with sogo-tool restore.

Please follow steps below to setup this daily cron job.

cd /var/vmail/backup/
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/tools/backup_sogo.sh
chmod +x backup_sogo.sh
/var/vmail/backup
            |- sogo/
                |- 2017/                # <- year
                    |- 03/              # <- month
                        |- 22.tar.bz2   # <- day (file name is: <day>.tar.bz2)
If you prefer a different backup root directory, please open
`backup_sogo.sh`, update variable `BACKUP_ROOTDIR` with the new directory.
# SOGo: backup all users' data at 3:05AM everyday.
5   3   *   *   *   bash /var/vmail/backup/backup_sogo.sh

OpenLDAP backend special

Fixed: Avoid possible backdooring mysqldump backups

For more details about this backdooring mysqldump backup issue, please read blog post:

Steps to fix it:

export CMD_MYSQLDUMP="mysqldump ..."
export CMD_MYSQLDUMP="mysqldump ... --skip-comments"

MySQL/MariaDB backend special

Fixed: Avoid possible backdooring mysqldump backups

For more details about this backdooring mysqldump backup issue, please read blog post:

Steps to fix it:

export CMD_MYSQLDUMP="mysqldump ..."
export CMD_MYSQLDUMP="mysqldump ... --skip-comments"