iRedMail Easy: Migrate from iRedMail to iRedMail Easy platform

Attention

iRedMail Team can help migrate your iRedMail server, feel free to Contact Us.

Summary

iRedMail Easy platform offers deployment, one-click upgrade support and technical support for your iRedMail servers, it's very easy to keep your server up to date with the ease to use web UI, and get issues solved by iRedMail Team quickly.

For more details about iRedMail Easy platform, please check our website.

Requirements

Unfortunately, FreeBSD is not supported by iRedMail Easy platform.

Backup first

Please backup all important data before preparing the migration, including but not limtied to:

MySQL backend: Remove MySQL (not MariaDB) packages

Attention

iRedMail Easy installs MariaDB instead of MySQL, if you're running MySQL backend, you need to:

Create required files used by iRedMail Easy

iRedMail Easy doesn't store any SQL/LDAP passwords on its deployment servers, instead it reads from files under /root/.iredmail/kv/ on your server to get the passwords.

Please create these files under /root/.iredmail/kv/ with correct passwords manually, each file should contain only one line, passwords must be in plain text, not the hashed one.

Attention

You can find all info in the iRedMail.tips file under iRedMail installation directory, for example, /root/iRedMail-0.9.9/iRedMail.tips. If you don't have this file anymore, you can still find them in other config files.

Backend File Name Comment Value could be found in file
LDAP, MySQL sql_user_root MySQL root password. /root/.my.cnf
PostgreSQL sql_user_postgres (Linux)
sql_user__postgresql (OpenBSD)
PostgreSQL root password. /var/lib/pgsql/.pgpass (CentOS), or /var/lib/postgresql/.pgpass (Debian/Ubuntu), /var/postgresql/.pgpass (OpenBSD)
LDAP ldap_root_password Password of LDAP root dn (cn=Manager,dc=xx,dc=xx)
LDAP ldap_vmail_password Password of LDAP dn cn=vmail,dc=xx,dc=xx /etc/postfix/ldap/*.cf
LDAP ldap_vmailadmin_password Password of LDAP dn cn=vmailadmin,dc=xx,dc=xx /opt/www/iredadmin/settings.py
MySQL, PostgreSQL sql_user_vmail Password of SQL user vmail /etc/postfix/mysql/*.cf or /etc/postfix/pgsql/*.cf
MySQL, PostgreSQL sql_user_vmailadmin Password of SQL user vmailadmin /opt/www/iredadmin/settings.py
ALL sql_user_amavisd Password of SQL user amavisd /etc/amavisd/amavisd.conf (Linux/OpenBSD)
/etc/amavis/conf.d/50-user (Debian/Ubuntu)
ALL sql_user_sa_bayes Password of SQL user sa_bayes. If you didn't integrate SpamAssassin with SQL database, it's ok to not create this file. /etc/mail/spamassassin/local.cf
ALL sql_user_iredadmin Password of SQL user iredadmin /opt/www/iredadmin/settings.py
ALL sql_user_iredapd Password of SQL user iredapd /opt/iredapd/settings.py
ALL sql_user_roundcube Password of SQL user roundcube /root/.my.cnf-roundcube or /opt/www/roundcubemail/config/config.inc.php
ALL sql_user_sogo Password of SQL user sogo. If you didn't install SOGo, it's ok to not create this file. /etc/sogo/sogo.conf
ALL sql_user_netdata Password of SQL user netdata. If you didn't install netdata, it's ok to not create this file. /root/.my.cnf-netdata or /opt/netdata/etc/netdata/my.cnf
ALL sql_user_fail2ban Password of SQL user fail2ban. If you didn't integrate Fail2ban with SQL server, it's ok to not create this file. /root/.my.cnf-fail2ban (OpenLDAP or MariaDB backends), or /var/lib/pgsql/.pgpass (CentOS), or /var/lib/postgresql/.pgpass (Debian/Ubuntu), /var/postgresql/.pgpass (OpenBSD)
ALL iredapd_srs_secret The secret string used to sign SRS. It's ok if not present. /opt/iredapd/settings.py, parameter srs_secrets =.
ALL sogo_sieve_master_password The Dovecot master user used by SOGo. It's ok if not present. /etc/sogo/sieve.cred.
ALL roundcube_des_key The DES key used by Roundcube to encrypt the session. /opt/www/roundcubemail/config/config.inc.php, parameter $config['des_key'] =.
ALL mlmmjadmin_api_token API token for authentication. /opt/mlmmjadmin/settings.py, parameter api_auth_tokens =.
ALL first_domain_admin_password Password of the mail user postmaster@<your-domain.com>. your-domain.com is the first mail domain name you (are going to) set in mail server profile page on iRedMail Easy platform, you can find it in mail server profile page, under tab Settings.

Copy files to new locations

iRedMail Easy stores SSL cert/key files under /opt/iredmail/ssl/, you need to either copy or (symbol) link existing ssl cert/key to this directory with correct files names,

Split custom settings

iRedMail Easy maintains the core config files, and each time you perform full deployment or upgrade, these core config files will be re-generated, all your custom config files will be lost. So it's very important to not touch these core config files and just store your custom settings in pre-defined files under /opt/iredmail/custom/<software>/.

Postfix

Amavisd

SpamAssassin

Split custom settings from /etc/mail/spamassassin/local.cf to /opt/iredmail/custom/spamassassin/custom.cf.

If you have whitelisted IP addresses/networks listed in Postfix config file /etc/postfix/main.cf, parameter mynetworks =, you may want to whitelist them to avoid spam/virus scanning in /opt/iredmail/custom/spamassassin/custom.cf too. For example:

trusted_networks 192.168.0.1 172.16.0.0/8

Roundcube Webmail

iRedAPD

Copy custom settings from /opt/iredapd/settings.py to /opt/iredmail/custom/iredapd/settings.py (this file will be linked back to /opt/iredapd/custom_settings.py).

If you have whitelisted IP addresses/networks listed in Postfix config file /etc/postfix/main.cf, parameter mynetworks =, you may want to whitelist them to avoid greylisting or other access control in /opt/iredmail/custom/iredapd/settings.py too. For example:

MYNEWTORKS = ['192.168.0.1', '172.16.0.0/8']

iRedAdmin(-Pro)

Copy custom settings from /opt/www/iredadmin/settings.py to /opt/iredmail/custom/iredadmin/settings.py.

Run the full deployment with iRedMail Easy platform

Please follow our tutorial Getting start with iRedMail Easy to sign up, and add your mail server info, then perform the full deployment.

Post-deployment tasks

Remove duplicate cron jobs

iRedMail Easy will add required cron jobs for root and sogo users, but it can not detect and remove old duplicate jobs, so you have to check cron jobs manually and remove duplicate old ones and keep the ones added by iRedMail Easy.