317 lines
15 KiB
HTML
317 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>Upgrade iRedMail from 0.9.8 to 0.9.9</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;"
|
|
/>
|
|
<span>iRedMail</span>
|
|
</a>
|
|
// <a href="./index.html">Document Index</a></div><h1 id="upgrade-iredmail-from-098-to-099">Upgrade iRedMail from 0.9.8 to 0.9.9</h1>
|
|
<div class="toc">
|
|
<ul>
|
|
<li><a href="#upgrade-iredmail-from-098-to-099">Upgrade iRedMail from 0.9.8 to 0.9.9</a><ul>
|
|
<li><a href="#changelog">ChangeLog</a></li>
|
|
<li><a href="#general-all-backends-should-apply-these-steps">General (All backends should apply these steps)</a><ul>
|
|
<li><a href="#update-etciredmail-release-with-new-iredmail-version-number">Update /etc/iredmail-release with new iRedMail version number</a></li>
|
|
<li><a href="#upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release-23">Upgrade iRedAPD (Postfix policy server) to the latest stable release (2.3)</a></li>
|
|
<li><a href="#upgrade-iredadmin-open-source-edition-to-the-latest-stable-release-10">Upgrade iRedAdmin (open source edition) to the latest stable release (1.0)</a></li>
|
|
<li><a href="#upgrade-roundcube-webmail-to-the-latest-stable-release-136">Upgrade Roundcube webmail to the latest stable release (1.3.6)</a></li>
|
|
<li><a href="#fix-incorrect-file-ownergroup-of-mlmmjadmin-config-file">Fix incorrect file owner/group of mlmmjadmin config file</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#openldap-special">OpenLDAP special</a><ul>
|
|
<li><a href="#update-iredmail-ldap-schema-file">Update iRedMail LDAP schema file</a></li>
|
|
<li><a href="#dovecot-read-mailbox-format-from-ldap">Dovecot: read mailbox format from LDAP</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#mysqlmariadb-special">MySQL/MariaDB special</a><ul>
|
|
<li><a href="#sql-structure-changes-in-vmail-database">SQL structure changes in vmail database</a></li>
|
|
<li><a href="#dovecot-read-mailbox-format-from-sql">Dovecot: read mailbox format from SQL</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#postgresql-special">PostgreSQL special</a><ul>
|
|
<li><a href="#sql-structure-changes-in-vmail-database_1">SQL structure changes in vmail database</a></li>
|
|
<li><a href="#dovecot-read-mailbox-format-from-sql_1">Dovecot: read mailbox format from SQL</a><ul>
|
|
<li><a href="#postgresql-8x">PostgreSQL 8.x</a></li>
|
|
<li><a href="#postgresql-9x-and-later-releases">PostgreSQL 9.x and later releases</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Paid Remote Upgrade Support</p>
|
|
<p>We offer remote upgrade support if you don't want to get your hands dirty,
|
|
check <a href="https://www.iredmail.org/support.html">the details</a> and
|
|
<a href="https://www.iredmail.org/contact.html">contact us</a>.</p>
|
|
</div>
|
|
<h2 id="changelog">ChangeLog</h2>
|
|
<h2 id="general-all-backends-should-apply-these-steps">General (All backends should apply these steps)</h2>
|
|
<h3 id="update-etciredmail-release-with-new-iredmail-version-number">Update <code>/etc/iredmail-release</code> with new iRedMail version number</h3>
|
|
<p>iRedMail stores the release version in <code>/etc/iredmail-release</code> 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:</p>
|
|
<pre><code>0.9.9
|
|
</code></pre>
|
|
|
|
<h3 id="upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release-23">Upgrade iRedAPD (Postfix policy server) to the latest stable release (2.3)</h3>
|
|
<p>Please follow below tutorial to upgrade iRedAPD to the latest stable release:
|
|
<a href="./upgrade.iredapd.html">Upgrade iRedAPD to the latest stable release</a></p>
|
|
<h3 id="upgrade-iredadmin-open-source-edition-to-the-latest-stable-release-10">Upgrade iRedAdmin (open source edition) to the latest stable release (1.0)</h3>
|
|
<p>Please follow this tutorial to upgrade iRedAdmin open source edition to the
|
|
latest stable release:
|
|
<a href="./migrate.or.upgrade.iredadmin.html">Upgrade iRedAdmin to the latest stable release</a></p>
|
|
<h3 id="upgrade-roundcube-webmail-to-the-latest-stable-release-136">Upgrade Roundcube webmail to the latest stable release (1.3.6)</h3>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Roundcube 1.3</p>
|
|
<ul>
|
|
<li>Roundcube 1.3 requires at least <strong>PHP 5.4</strong>. If your server is still running
|
|
PHP 5.3 and cannot upgrade to 5.4, please upgrade Roundcube to the latest
|
|
1.2 branch (1.2.5) instead.</li>
|
|
<li>Roundcube 1.3 no longer supports IE < 10 and old versions of Firefox,
|
|
Chrome and Safari.</li>
|
|
<li>Roundcube 1.3 uses jQuery 3.2 and will not work with current jQuery
|
|
mobile plugin. If you use any third-party plugin, please check its
|
|
website to make sure it's compatible with Roundcube 1.3 before upgrading.</li>
|
|
</ul>
|
|
<p>With the release of Roundcube 1.3.0, the previous stable release branches
|
|
1.2.x and 1.1.x will switch in to LTS low maintenance mode which means
|
|
they will only receive important security updates but no longer any regular
|
|
improvement updates.</p>
|
|
</div>
|
|
<p>Please follow Roundcube official tutorial to upgrade Roundcube webmail to the
|
|
latest stable release immediately:</p>
|
|
<ul>
|
|
<li><a href="https://github.com/roundcube/roundcubemail/wiki/Upgrade">How to upgrade Roundcube</a>.</li>
|
|
</ul>
|
|
<h3 id="fix-incorrect-file-ownergroup-of-mlmmjadmin-config-file">Fix incorrect file owner/group of mlmmjadmin config file</h3>
|
|
<p>Please run commands below to fix incorrect file owner/group and permission:</p>
|
|
<pre><code>chown mlmmj:mlmmj /opt/mlmmjadmin/settings.py
|
|
chmod 0400 /opt/mlmmjadmin/settings.py
|
|
</code></pre>
|
|
|
|
<h2 id="openldap-special">OpenLDAP special</h2>
|
|
<h3 id="update-iredmail-ldap-schema-file">Update iRedMail LDAP schema file</h3>
|
|
<p>iRedMail-0.9.9 introduces 2 new LDAP attributes for mail user account:</p>
|
|
<ul>
|
|
<li><code>mailboxFormat</code>: used to store mailbox format. All formats supported by
|
|
Dovecot are ok. for example, <code>maildir</code>, <code>mdbox</code>. For more details, please
|
|
check Dovecot document here: <a href="https://wiki2.dovecot.org/MailboxFormat">https://wiki2.dovecot.org/MailboxFormat</a></li>
|
|
<li><code>mailboxFolder</code>: used to store the folder name which will be appended to
|
|
maildir path. Defaults to <code>Maildir</code>.</li>
|
|
</ul>
|
|
<p>With these 2 new attributes, it will be very easy to switch different mailbox
|
|
format.</p>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>If you use different mailbox format, you need to set mailbox format to the
|
|
one you're using.</p>
|
|
</div>
|
|
<p>Download the latest iRedMail LDAP schema file</p>
|
|
<ul>
|
|
<li>On RHEL/CentOS:</li>
|
|
</ul>
|
|
<pre><code>cd /tmp
|
|
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
|
|
|
|
cd /etc/openldap/schema/
|
|
cp iredmail.schema iredmail.schema.bak
|
|
|
|
cp -f /tmp/iredmail.schema /etc/openldap/schema/
|
|
service slapd restart
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>On Debian/Ubuntu:</li>
|
|
</ul>
|
|
<pre><code>cd /tmp
|
|
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
|
|
|
|
cd /etc/ldap/schema/
|
|
cp iredmail.schema iredmail.schema.bak
|
|
|
|
cp -f /tmp/iredmail.schema /etc/ldap/schema/
|
|
service slapd restart
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>On FreeBSD:</li>
|
|
</ul>
|
|
<pre><code>cd /tmp
|
|
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
|
|
|
|
cd /usr/local/etc/openldap/schema/
|
|
cp iredmail.schema iredmail.schema.bak
|
|
|
|
cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
|
|
service slapd restart
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>On OpenBSD:</p>
|
|
<blockquote>
|
|
<p>Note: if you're running ldapd as LDAP server, the schema directory is
|
|
<code>/etc/ldap</code>, and service name is <code>ldapd</code>.</p>
|
|
</blockquote>
|
|
</li>
|
|
</ul>
|
|
<pre><code>cd /tmp
|
|
ftp https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
|
|
|
|
cd /etc/openldap/schema/
|
|
cp iredmail.schema iredmail.schema.bak
|
|
|
|
cp -f /tmp/iredmail.schema /etc/openldap/schema/
|
|
rcctl restart slapd
|
|
</code></pre>
|
|
|
|
<h3 id="dovecot-read-mailbox-format-from-ldap">Dovecot: read mailbox format from LDAP</h3>
|
|
<p>Please open file <code>/etc/dovecot/dovecot-ldap.conf</code> (Linux/OpenBSD) or
|
|
<code>/usr/local/etc/dovecot/dovecot-ldap.conf</code> (FreeBSD), find the <code>user_attrs =</code>
|
|
line like below:</p>
|
|
<pre><code>user_attrs = mail=master_user,mail=user,homeDirectory=home,=mail=maildir:~/Maildir/,mailQuota=quota_rule=*:bytes=%$
|
|
</code></pre>
|
|
|
|
<p>Please replace it by below one:</p>
|
|
<pre><code>user_attrs = mail=master_user,mail=user,homeDirectory=home,=mail=%{ldap:mailboxFormat:maildir}:~/%{ldap:mailboxFolder:Maildir}/,mailQuota=quota_rule=*:bytes=%$
|
|
</code></pre>
|
|
|
|
<p>If attribute <code>mailboxFormat</code> doesn't present in user object, Dovecot will use
|
|
string <code>maildir</code> as default value.</p>
|
|
<h2 id="mysqlmariadb-special">MySQL/MariaDB special</h2>
|
|
<h3 id="sql-structure-changes-in-vmail-database">SQL structure changes in <code>vmail</code> database</h3>
|
|
<p>We've made some changes to <code>vmail</code> database:</p>
|
|
<ul>
|
|
<li>New SQL column <code>mailbox.mailboxformat</code>: used to store mailbox format.
|
|
All formats supported by Dovecot are ok. for example, <code>maildir</code>, <code>mdbox</code>.
|
|
<strong>Default value is <code>maildir</code>.</strong>
|
|
For more details, please check Dovecot document here:
|
|
<a href="https://wiki2.dovecot.org/MailboxFormat">https://wiki2.dovecot.org/MailboxFormat</a></li>
|
|
<li><code>mailboxfolder</code>: used to store the folder name which will be appended to
|
|
maildir path. Defaults to <code>Maildir</code>.</li>
|
|
</ul>
|
|
<p>With these 2 new columns, it will be very easy to migrate existing mailbox to
|
|
different mailbox format, or set different mailbox for new user.</p>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>If you use different mailbox format, you need to set mailbox format to the
|
|
one you're using.</p>
|
|
</div>
|
|
<p>Download SQL template file and import it:</p>
|
|
<pre><code>cd /root/
|
|
wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/0.9.9/iredmail.mysql
|
|
mysql vmail < /root/iredmail.mysql
|
|
</code></pre>
|
|
|
|
<h3 id="dovecot-read-mailbox-format-from-sql">Dovecot: read mailbox format from SQL</h3>
|
|
<p>Please open file <code>/etc/dovecot/dovecot-mysql.conf</code> (Linux/OpenBSD) or
|
|
<code>/usr/local/etc/dovecot/dovecot-mysql.conf</code> (FreeBSD), find the <code>user_attrs =</code>
|
|
line like below:</p>
|
|
<pre><code>user_query = SELECT \
|
|
...
|
|
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
|
|
...
|
|
</code></pre>
|
|
|
|
<p>Add a new <code>CONCAT</code> line after above <code>CONCAT()</code> line:</p>
|
|
<pre><code>user_query = SELECT \
|
|
...
|
|
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
|
|
CONCAT(mailbox.mailboxformat, ':', mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir, '/Maildir') AS mail, \
|
|
...
|
|
</code></pre>
|
|
|
|
<h2 id="postgresql-special">PostgreSQL special</h2>
|
|
<h3 id="sql-structure-changes-in-vmail-database_1">SQL structure changes in <code>vmail</code> database</h3>
|
|
<p>We've made some changes to <code>vmail</code> database:</p>
|
|
<ul>
|
|
<li>New SQL column <code>mailbox.mailboxformat</code>: used to store mailbox format.
|
|
All formats supported by Dovecot are ok. for example, <code>maildir</code>, <code>mdbox</code>.
|
|
<strong>Default value is <code>maildir</code>.</strong>
|
|
For more details, please check Dovecot document here:
|
|
<a href="https://wiki2.dovecot.org/MailboxFormat">https://wiki2.dovecot.org/MailboxFormat</a></li>
|
|
<li><code>mailboxfolder</code>: used to store the folder name which will be appended to
|
|
maildir path. Defaults to <code>Maildir</code>.</li>
|
|
</ul>
|
|
<p>With these 2 new columns, it will be very easy to migrate existing mailbox to
|
|
different mailbox format, or set different mailbox for new user.</p>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>If you use different mailbox format, you need to set mailbox format to the
|
|
one you're using.</p>
|
|
</div>
|
|
<p>Download SQL template file used to update SQL database:</p>
|
|
<pre><code>cd /root/
|
|
wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/0.9.9/iredmail.mysql
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Run shell commands as root user below to connect to PostgreSQL server:</li>
|
|
</ul>
|
|
<pre><code># su - postgres
|
|
$ psql -d vmail
|
|
sql> \i /tmp/mysql.pgsql
|
|
</code></pre>
|
|
|
|
<h3 id="dovecot-read-mailbox-format-from-sql_1">Dovecot: read mailbox format from SQL</h3>
|
|
<p>Please open file <code>/etc/dovecot/dovecot-pgsql.conf</code> (Linux/OpenBSD) or
|
|
<code>/usr/local/etc/dovecot/dovecot-pgsql.conf</code> (FreeBSD), then</p>
|
|
<h4 id="postgresql-8x">PostgreSQL 8.x</h4>
|
|
<p>If you're running <strong>PostgreSQL 8.x</strong>, you can find the <code>user_attrs =</code> line like
|
|
below:</p>
|
|
<pre><code>user_query = SELECT \
|
|
mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir AS home, \
|
|
...
|
|
</code></pre>
|
|
|
|
<p>Please Add a line after above line:</p>
|
|
<pre><code>user_query = SELECT \
|
|
mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir AS home, \
|
|
mailbox.mailboxformat || ':' || mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir || '/' || mailbox.mailboxfolder || '/' AS mail, \
|
|
...
|
|
</code></pre>
|
|
|
|
<p>Restart Dovecot service is required.</p>
|
|
<h4 id="postgresql-9x-and-later-releases">PostgreSQL 9.x and later releases</h4>
|
|
<p>If you're running <strong>PostgreSQL 9.x</strong> and later releases, you can find the
|
|
<code>user_attrs =</code> line like below:</p>
|
|
<pre><code>user_query = SELECT \
|
|
...
|
|
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
|
|
...
|
|
</code></pre>
|
|
|
|
<p>Add a new <code>CONCAT</code> line after above <code>CONCAT()</code> line:</p>
|
|
<pre><code>user_query = SELECT \
|
|
...
|
|
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
|
|
CONCAT(mailbox.mailboxformat, ':', mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir, '/', mailbox.mailboxfolder, '/') AS mail, \
|
|
...
|
|
</code></pre>
|
|
|
|
<p>Restart Dovecot service is required.</p><div class="footer">
|
|
<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> |