iredmail-doc/html/migrate.to.iredmail.easy.html

196 lines
12 KiB
HTML
Raw Normal View History

2019-06-05 20:44:39 -05:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Migrate from iRedMail to iRedMail Easy platform</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="https://www.iredmail.org" target="_blank">
<img alt="iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>&nbsp;
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="migrate-from-iredmail-to-iredmail-easy-platform">Migrate from iRedMail to iRedMail Easy platform</h1>
<div class="toc">
<ul>
<li><a href="#migrate-from-iredmail-to-iredmail-easy-platform">Migrate from iRedMail to iRedMail Easy platform</a><ul>
<li><a href="#summary">Summary</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#backup-first">Backup first</a></li>
2019-06-05 20:44:39 -05:00
<li><a href="#create-required-files-used-by-iredmail-easy">Create required files used by iRedMail Easy</a></li>
2019-06-06 02:36:43 -05:00
<li><a href="#copy-files-to-new-locations">Copy files to new locations</a></li>
2019-06-21 00:49:56 -05:00
<li><a href="#split-custom-settings">Split custom settings</a><ul>
<li><a href="#postfix">Postfix</a></li>
<li><a href="#roundcube-webmail">Roundcube Webmail</a></li>
<li><a href="#iredapd">iRedAPD</a></li>
<li><a href="#iredadmin-pro">iRedAdmin(-Pro)</a></li>
2019-06-05 20:44:39 -05:00
</ul>
</li>
2019-06-21 00:49:56 -05:00
<li><a href="#run-the-full-deployment-with-iredmail-easy-platform">Run the full deployment with iRedMail Easy platform</a></li>
2019-06-05 20:44:39 -05:00
</ul>
</li>
</ul>
</div>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>iRedMail Team can help migrate your iRedMail server, feel free to
<a href="https://www.iredmail.org/contact.html">Contact Us</a>.</p>
</div>
<h2 id="summary">Summary</h2>
<p>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.</p>
<p>For more details about iRedMail Easy platform, please
<a href="https://www.iredmail.org/easy.html">check our website</a>.</p>
<h2 id="requirements">Requirements</h2>
<ul>
<li>A working iRedMail server which was deployed with the downlodable installer
<code>iRedMail-0.9.9</code>, or has been successfully upgraded to the latest
iRedMail-0.9.9 release.</li>
<li>Your iRedMail server must be running one of supported Linux/OpenBSD
distribution releases:<ul>
<li>Ubuntu 18.04 LTS</li>
<li>Debian 9</li>
<li>CentOS 7</li>
<li>OpenBSD 6.4, 6.5</li>
</ul>
</li>
</ul>
<p>Unfortunately, FreeBSD is not supported by iRedMail Easy platform.</p>
<h2 id="backup-first">Backup first</h2>
<p>Please backup all important data before preparing the migration, including but not limtied to:</p>
<ul>
<li>
<p>All SQL/LDAP databases.</p>
<p>iRedMail Easy will use existing SQL/LDAP databases, no data corruption is expected.</p>
</li>
<li>
<p>All config files under <code>/etc</code> directory.</p>
<p>After moved to iRedMail Easy, you should place all your custom settings in files
under <code>/opt/iredmail/custom/&lt;software&gt;/</code>.</p>
</li>
</ul>
2019-06-05 20:44:39 -05:00
<h2 id="create-required-files-used-by-iredmail-easy">Create required files used by iRedMail Easy</h2>
<p>iRedMail Easy doesn't store any SQL/LDAP passwords, instead it reads from files
under <code>/root/.iredmail/kv/</code> on your server to get them.</p>
<p>Please create these files under <code>/root/.iredmail/kv/</code> with correct passwords
manually, each file should contain only one line, passwords must be in plain
text, not the hashed one.</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>You can find all info in the <code>iRedMail.tips</code> file under iRedMail
installation directory, for example, <code>/root/iRedMail-0.9.9/iRedMail.tips</code>.
If you don't have this file anymore, you can still find them in other
config files.</p>
</div>
<ul>
<li><code>sql_user_root</code>: the MySQL root password. This is required for OpenLDAP
2019-06-05 20:44:39 -05:00
and MySQL/MariaDB backends. You can find it in file <code>/root/.my.cnf</code> or <code>/root/.my.cnf-root</code>.</li>
<li><code>pgsql_root_password</code>: The PostgreSQL root password. This is required for
PostgreSQL backend. You can find it in the <code>.pgpass</code> file under PostgreSQL
data directory.<ul>
<li>on CentOS, it's <code>/var/lib/pgsql/.pgpass</code>.</li>
<li>on Debian/Ubuntu, it's <code>/var/lib/postgresql/.pgpass</code>.</li>
<li>on OpenBSD, it's <code>/var/postgresql/.pgpass</code>.</li>
</ul>
</li>
<li><code>ldap_root_password</code>: The password of OpenLDAP root dn (cn=Manager,dc=xx,dc=xx).
This is required for OpenLDAP backend.</li>
<li><code>ldap_vmail_password</code>: The password of LDAP dn <code>cn=vmail,dc=xx,dc=xx</code>.</li>
<li><code>ldap_vmailadmin_password</code>: The password of LDAP dn <code>cn=vmailadmin,dc=xx,dc=xx</code>.</li>
<li><code>sql_user_vmail</code>: The password of SQL user <code>vmail</code>.</li>
<li><code>sql_user_vmailadmin</code>: The password of SQL user <code>vmailadmin</code>.</li>
<li><code>sql_user_amavisd</code>: The password of SQL user <code>amavisd</code>.</li>
<li><code>sql_user_sa_bayes</code>: The password of SQL user <code>sa_bayes</code>.</li>
<li><code>sql_user_iredadmin</code>: The password of SQL user <code>iredadmin</code>.</li>
<li><code>sql_user_iredapd</code>: The password of SQL user <code>iredapd</code>.</li>
<li><code>sql_user_sogo</code>: The password of SQL user <code>sogo</code>.</li>
<li><code>sql_user_netdata</code>: The password of SQL user <code>netdata</code>. You can find it in <code>/root/.my.cnf-netdata</code> or <code>/opt/netdata/etc/netdata/my.cnf</code>.</li>
<li><code>sql_user_roundcube</code>: The password of SQL user <code>roundcube</code>.</li>
<li><code>iredapd_srs_secret</code>: The secret string used by iRedAPD to sign SRS. You can find it in <code>/opt/iredapd/settings.py</code>, parameter <code>srs_secrets =</code>. if you don't have this parameter in file due to old iRedAPD release, it's ok to ignore it and let iRedMail Easy to generate one.</li>
2019-06-05 20:44:39 -05:00
<li><code>sogo_sieve_master_password</code>: The Dovecot master user used by SOGo. You can find it in <code>/etc/sogo/sieve.cred</code>.</li>
<li><code>roundcube_des_key</code>: The DES key used by Roundcube to encrypt the session. You can find it in <code>/opt/www/roundcubemail/config/config.inc.php</code>, parameter <code>$config['des_key'] =</code>.</li>
<li><code>mlmmjadmin_api_token</code>: The token string used by iRedAdmin-Pro to communicate with mlmmjadmin. You can find it in <code>/opt/mlmmjadmin/settings.py</code>, parameter <code>api_auth_tokens =</code>.</li>
<li><code>first_domain_admin_password</code>: The password of the mail user <code>postmaster@&lt;your-domain.com&gt;</code>. Note: here <code>your-domain.com</code> 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 <code>Settings</code>.</li>
2019-06-05 20:44:39 -05:00
</ul>
<h2 id="copy-files-to-new-locations">Copy files to new locations</h2>
<p>iRedMail Easy stores SSL cert/key files under <code>/opt/iredmail/ssl/</code>, you need to
either copy or (symbol) link existing ssl cert/key to this directory with
correct files names,</p>
<ul>
<li><code>/opt/iredmail/ssl/key.pem</code>: private key</li>
<li><code>/opt/iredmail/ssl/cert.pem</code>: certificate</li>
<li><code>/opt/iredmail/ssl/combined.pem</code>: full chain</li>
</ul>
2019-06-21 00:49:56 -05:00
<h2 id="split-custom-settings">Split custom settings</h2>
<p>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 <code>/opt/iredmail/custom/&lt;software&gt;/</code>.</p>
<h3 id="postfix">Postfix</h3>
<ul>
<li>
<p>Files under <code>/etc/postfix/</code>:</p>
<ul>
<li><code>body_checks.pcre</code></li>
<li><code>command_filter.pcre</code></li>
<li><code>header_checks.pcre</code></li>
<li><code>helo_access.pcre</code></li>
<li><code>postscreen_access.cidr</code></li>
<li><code>postscreen_dnsbl_reply.texthash</code></li>
<li><code>rdns_access.pcre</code></li>
<li><code>sender_access.pcre</code></li>
<li><code>smtp_tls_policy</code></li>
<li><code>transport</code></li>
</ul>
<p>Please copy your custom settings from above files to the files with same
names under <code>/opt/iredmail/custom/postfix/</code>. For example:</p>
<ul>
<li>From <code>/etc/postfix/body_checks.pcre</code> to <code>/opt/iredmail/custom/postfix/body_checks.pcre</code>.</li>
<li>From <code>/etc/postfix/command_filter.pcre</code> to <code>/opt/iredmail/custom/postfix/command_filter.pcre</code>.</li>
</ul>
<p>You need to create directory <code>/opt/iredmail/custom/postfix/</code> and the files
if they don't exist, iRedMail Easy will set correct owner/group and
permission for them while deployment.</p>
<p>If you're lasy and don't want to check files one by one, it's ok to simply
copy these files from <code>/etc/postfix/</code> to <code>/opt/iredmail/custom/postfix/</code>
directly, and (optionally) remove non-custom settings later.</p>
</li>
<li>
<p><code>/etc/postfix/main.cf</code> and <code>/etc/postfix/master.cf</code></p>
<p>Postfix doesn't support <code>include</code> directive to load extra config files,
so if you have custom settings in these 2 files, you have to create shell
script file <code>/opt/iredmail/custom/postfix/custom.sh</code> to update them with
<code>postconf</code> command during iRedMail Easy deployment or upgrade. For more
details, please check our
<a href="./iredmail-easy.best.practice.html#postfix">Best Practice</a> tutorial.</p>
</li>
</ul>
<h3 id="roundcube-webmail">Roundcube Webmail</h3>
2019-07-03 21:53:23 -05:00
<p>Copy custom settings from <code>/opt/www/roundcubemail/config/config.inc.php</code> to <code>/opt/iredmail/custom/roundcube/config/custom.inc.php</code>.</p>
2019-06-21 00:49:56 -05:00
<h3 id="iredapd">iRedAPD</h3>
<p>Copy custom settings from <code>/opt/iredapd/settings.py</code> to <code>/opt/iredmail/custom/iredapd/settings.py</code>.</p>
<h3 id="iredadmin-pro">iRedAdmin(-Pro)</h3>
<p>Copy custom settings from <code>/opt/www/iredadmin/settings.py</code> to <code>/opt/iredmail/custom/iredadmin/settings.py</code>.</p>
2019-06-06 02:36:43 -05:00
<h2 id="run-the-full-deployment-with-iredmail-easy-platform">Run the full deployment with iRedMail Easy platform</h2>
<p>Please follow our tutorial <a href="./iredmail-easy.getting.start.html">Getting start with iRedMail Easy</a>
2019-06-21 00:49:56 -05:00
to sign up, and add your mail server info, then perform the full deployment.</p><div class="footer">
2019-06-05 20:44:39 -05:00
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3293801-21"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-3293801-21');
</script>
</body></html>