New: upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md.
This commit is contained in:
parent
f38fcc1552
commit
a0620a5fc9
3
TODO.md
3
TODO.md
|
@ -1,6 +1,7 @@
|
|||
# TODO
|
||||
|
||||
* iRedMail upgrade tutorials
|
||||
* [WIP] iRedMail upgrade tutorials
|
||||
|
||||
* Upgrade iRedAPD: http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD
|
||||
* How to enable SSHA512/BCRYPT in Dovecot + Roundcubemail.
|
||||
* How to custom SpamAssassin scores
|
||||
|
|
|
@ -92,9 +92,11 @@ for chapter_dir in ${all_chapter_dirs}; do
|
|||
fi
|
||||
|
||||
# Get title.
|
||||
# title format: '# title'
|
||||
_article_title="$(head -1 ${article_file} | awk -F'# ' '{print $2}')"
|
||||
#_article_title="$(head -1 ${article_file} | awk -F'Title: ' '{print $2}')"
|
||||
#echo "article title: ${_article_title}"
|
||||
# title format: '<h1>title</h1>'
|
||||
#_article_title="$(head -1 ${article_file} | awk -F'<h1>' '{print $2}' | awk -F'</h1>' '{print $1}')"
|
||||
|
||||
#echo "* [${_article_title}](${chapter_dir_in_article}/${article_html_file})" >> ${INDEX_MD}
|
||||
if [ X"${hide_article_in_index}" == X'NO' ]; then
|
||||
echo "* [${_article_title}](${article_html_file})" >> ${INDEX_MD}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<li><strong>0.8.7</strong>, released on May 13, 2014. <a href="http://www.iredmail.org/forum/topic6872-news-announcements-bug-fixes-iredmail087-has-been-released.html">Release notes</a>, <a href="./upgrade.iredmail.0.8.6-0.8.7.html">Upgrade from iRedMail-0.8.6</a></li>
|
||||
<li><strong>0.8.6</strong>, released on Dec 16, 2013. <a href="http://www.iredmail.org/forum/topic5831-iredmail086-has-been-released.html">Release notes</a>, <a href="./upgrade.iredmail.0.8.5-0.8.6.html">Upgrade from iRedMail-0.8.5</a></li>
|
||||
<li><strong>0.8.5</strong>, released on Jul 16, 2013. <a href="http://www.iredmail.org/forum/topic5167-news-announcements-bug-fixes-iredmail085-has-been-released.html">Release notes</a>, <a href="./upgrade.iredmail.0.8.4-0.8.5.html">Upgrade from iRedMail-0.8.4</a></li>
|
||||
<li><strong>0.8.4</strong>, released on Mar 26, 2013. <a href="http://www.iredmail.org/forum/topic4646-news-announcements-bug-fixes-iredmail084-has-been-released.html">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.3-0.8.4">Upgrade from iRedMail-0.8.3</a></li>
|
||||
<li><strong>0.8.4</strong>, released on Mar 26, 2013. <a href="http://www.iredmail.org/forum/topic4646-news-announcements-bug-fixes-iredmail084-has-been-released.html">Release notes</a>, <a href="./upgrade.iredmail.0.8.3-0.8.4.html">Upgrade from iRedMail-0.8.3</a></li>
|
||||
<li><strong>0.8.3</strong>, released on Oct 13, 2012. <a href="http://www.iredmail.org/forum/topic4016-news-announcements-bug-fixes-iredmail083-has-been-released.html">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.2-0.8.3">Upgrade from iRedMail-0.8.2</a></li>
|
||||
<li><strong>0.8.2</strong>, released on Sep 19, 2012. <a href="http://www.iredmail.org/forum/topic3913-news-announcements-bug-fixes-iredmail082-has-been-released.html">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.1-0.8.2">Upgrade from iRedMail-0.8.1</a></li>
|
||||
<li><strong>0.8.1</strong>, released on Jun 8, 2012. <a href="http://www.iredmail.org/forum/topic3499-news-announcements-bug-fixes-iredmail081-has-been-released.html">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.0-0.8.1">Upgrade from iRedMail-0.8.0</a></li>
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Upgrade iRedMail from 0.8.3 to 0.8.4</title>
|
||||
<link href="./css/markdown.css" rel="stylesheet"></head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
|
||||
|
||||
// <a href="./index.html">Document Index</a>
|
||||
</div><h1 id="upgrade-iredmail-from-083-to-084">Upgrade iRedMail from 0.8.3 to 0.8.4</h1>
|
||||
<div class="toc">
|
||||
<ul>
|
||||
<li><a href="#upgrade-iredmail-from-083-to-084">Upgrade iRedMail from 0.8.3 to 0.8.4</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-iredmail-version-number">Update /etc/iredmail-release with iRedMail version number</a></li>
|
||||
<li><a href="#upgrade-roundcube-webmail-to-the-latest-stable-release">Upgrade Roundcube webmail to the latest stable release</a></li>
|
||||
<li><a href="#upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release">Upgrade iRedAPD (Postfix policy server) to the latest stable release</a></li>
|
||||
<li><a href="#upgrade-iredadmin-open-source-edition-to-the-latest-stable-release">Upgrade iRedAdmin (open source edition) to the latest stable release</a></li>
|
||||
<li><a href="#add-new-alias-virusalert-in-postfix-for-amavisd">Add new alias virusalert in Postfix for Amavisd</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#openldap-backend-special">OpenLDAP backend special</a><ul>
|
||||
<li><a href="#fix-incorrect-ldap-query-filter-in-postfix">Fix incorrect LDAP query filter in Postfix</a><ul>
|
||||
<li><a href="#use-the-latest-ldap-schema-file-provided-by-iredmail">Use the latest LDAP schema file provided by iRedMail</a></li>
|
||||
<li><a href="#update-existing-accounts">Update existing accounts</a></li>
|
||||
<li><a href="#fix-incorrect-ldap-query-filter-in-postfix_1">Fix incorrect LDAP query filter in Postfix</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#supports-alias-domains-in-postfix-per-user-bcc-lookup-files">Supports alias domains in Postfix per-user bcc lookup files</a></li>
|
||||
<li><a href="#create-addition-sql-index-for-amavisd-database">Create addition SQL index for Amavisd database</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#mysql-backend-special">MySQL backend special</a><ul>
|
||||
<li><a href="#add-4-new-columns-used-for-per-user-restriction">Add 4 new columns used for per-user restriction</a></li>
|
||||
<li><a href="#create-addition-sql-index-for-amavisd-database_1">Create addition SQL index for Amavisd database</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#postgresql-backend-special">PostgreSQL backend special</a><ul>
|
||||
<li><a href="#add-4-new-columns-used-for-per-user-restriction_1">Add 4 new columns used for per-user restriction</a></li>
|
||||
<li><a href="#create-addition-sql-index-for-amavisd-database_2">Create addition SQL index for Amavisd database</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2 id="changelog">ChangeLog</h2>
|
||||
<ul>
|
||||
<li>2013-03-28: Update /etc/iredmail-release with iRedMail version number.</li>
|
||||
<li>2013-03-28: Upgrade Roundcube webmail to the latest 0.8.6.</li>
|
||||
<li>2013-03-25: [ldap] Fix incorrect LDAP query filter in Postfix.</li>
|
||||
<li>2013-01-08: [sql] Add 4 new columns in table <code>vmail.mailbox</code> for MySQL/PostgreSQL backends.</li>
|
||||
<li>2012-10-24: [ldap] Supports alias domains in Postfix per-user bcc lookup files.</li>
|
||||
</ul>
|
||||
<h2 id="general-all-backends-should-apply-these-steps">General (All backends should apply these steps)</h2>
|
||||
<h3 id="update-etciredmail-release-with-iredmail-version-number">Update /etc/iredmail-release with 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># File: /etc/iredmail-release
|
||||
|
||||
0.8.4
|
||||
</code></pre>
|
||||
|
||||
<h3 id="upgrade-roundcube-webmail-to-the-latest-stable-release">Upgrade Roundcube webmail to the latest stable release</h3>
|
||||
<p>Please follow Roundcube official tutorial to upgrade Roundcube webmail to the
|
||||
latest stable release immediately: <a href="http://trac.roundcube.net/wiki/Howto_Upgrade">How to upgrade Roundcube</a></p>
|
||||
<h3 id="upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release">Upgrade iRedAPD (Postfix policy server) to the latest stable release</h3>
|
||||
<p>Please follow below tutorial to upgrade iRedAPD to the latest stable release:
|
||||
<a href="http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD">How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release</a></p>
|
||||
<h3 id="upgrade-iredadmin-open-source-edition-to-the-latest-stable-release">Upgrade iRedAdmin (open source edition) to the latest stable release</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="add-new-alias-virusalert-in-postfix-for-amavisd">Add new alias <code>virusalert</code> in Postfix for Amavisd</h3>
|
||||
<p>Amavisd will send an email notification to address <code>virusalert@[YOUR_HOSTNAME]</code>
|
||||
by default, but we don't have this user in Postfix alias file
|
||||
<code>/etc/postfix/aliases</code> (on Linux/OpenBSD), or /usr/local/etc/postfix/aliases
|
||||
(on FreeBSD) or SQL/LDAP database, so emails cannot be delivered. Below steps
|
||||
add an alias in Postfix alias file, and it will be forwarded to root user by
|
||||
default.</p>
|
||||
<p>Add new alias (Note, use '/usr/local/etc/postfix/aliases' on FreeBSD instead),
|
||||
and update the database:</p>
|
||||
<pre><code># echo 'virusalert: root' >> /etc/postfix/aliases
|
||||
# postalias /etc/postfix/aliases
|
||||
</code></pre>
|
||||
|
||||
<h2 id="openldap-backend-special">OpenLDAP backend special</h2>
|
||||
<h3 id="fix-incorrect-ldap-query-filter-in-postfix">Fix incorrect LDAP query filter in Postfix</h3>
|
||||
<p>If you add external email addresses as mail list members, iRedAdmin-Pro will
|
||||
store them in attribute <code>memberOfGroup</code>, this will cause exported LDIF data
|
||||
cannot be restored. Below are steps to fix this issue.</p>
|
||||
<p>To fix this issue, we need the latest LDAP schema file provided by iRedMail.
|
||||
Steps are:</p>
|
||||
<ul>
|
||||
<li>Download the newest iRedMail ldap schema file</li>
|
||||
<li>Copy old ldap schema file as a backup copy</li>
|
||||
<li>Replace the old one</li>
|
||||
<li>Restart OpenLDAP service.</li>
|
||||
</ul>
|
||||
<p>Here we go:</p>
|
||||
<h4 id="use-the-latest-ldap-schema-file-provided-by-iredmail">Use the latest LDAP schema file provided by iRedMail</h4>
|
||||
<ul>
|
||||
<li>On RHEL/CentOS/Scientific Linux (both release 5.x and 6.x), openSUSE, Gentoo, OpenBSD:</li>
|
||||
</ul>
|
||||
<pre><code># cd /tmp
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
|
||||
|
||||
# cd /etc/openldap/schema/
|
||||
# cp iredmail.schema iredmail.schema.bak
|
||||
|
||||
# cp -f /tmp/iredmail.schema /etc/openldap/schema/
|
||||
# /etc/init.d/slapd restart # <-- Or: /etc/init.d/ldap 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.schema
|
||||
|
||||
# cd /etc/ldap/schema/
|
||||
# cp iredmail.schema iredmail.schema.bak
|
||||
|
||||
# cp -f /tmp/iredmail.schema /etc/ldap/schema/
|
||||
# /etc/init.d/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.schema
|
||||
|
||||
# cd /usr/local/etc/ldap/schema/
|
||||
# cp iredmail.schema iredmail.schema.bak
|
||||
|
||||
# cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
|
||||
# /usr/local/etc/rc.d/slapd restart
|
||||
</code></pre>
|
||||
|
||||
<h4 id="update-existing-accounts">Update existing accounts</h4>
|
||||
<ul>
|
||||
<li>Download python script used to adding missing values.</li>
|
||||
</ul>
|
||||
<pre><code># cd /root/
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_083_to_084.py
|
||||
</code></pre>
|
||||
|
||||
<p>Open downloaded file <code>updateLDAPValues_083_to_084.py</code>, set LDAP server related
|
||||
settings in file head. for example,</p>
|
||||
<pre><code># Part of file: updateLDAPValues_083_to_084.py
|
||||
|
||||
uri = 'ldap://127.0.0.1:389'
|
||||
basedn = 'o=domains,dc=example,dc=com'
|
||||
bind_dn = 'cn=vmailadmin,dc=example,dc=com'
|
||||
bind_pw = 'passwd'
|
||||
</code></pre>
|
||||
|
||||
<p>You can find required LDAP credential in iRedAdmin config file or <code>iRedMail.tips</code>
|
||||
file under your iRedMail installation directory. Using either
|
||||
<code>cn=Manager,dc=xx,dc=xx</code> or <code>cn=vmailadmin,dc=xx,dc=xx</code> as bind dn is ok.</p>
|
||||
<p>Execute this script, it will fix incorrect values and add correct ones:</p>
|
||||
<pre><code># python updateLDAPValues_083_to_084.py
|
||||
</code></pre>
|
||||
|
||||
<h4 id="fix-incorrect-ldap-query-filter-in-postfix_1">Fix incorrect LDAP query filter in Postfix</h4>
|
||||
<ul>
|
||||
<li>On Linux/OpenBSD, please update <code>/etc/postfix/ldap/virtual_group_maps.cf</code>.
|
||||
On FreeBSD, update <code>/usr/local/etc/postfix/ldap/virtual_group_maps.cf</code> instead.</li>
|
||||
</ul>
|
||||
<pre><code># Part of file: ldap/virtual_group_maps.cf
|
||||
|
||||
# OLD setting
|
||||
#query_filter = (&(memberOfGroup=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailUser)(objectClass=mailExternalUser)))
|
||||
|
||||
# New setting
|
||||
query_filter = (&(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(memberOfGroup=%s)(shadowAddress=%s))(|(objectClass=mailUser)(objectClass=mailExternalUser)))
|
||||
</code></pre>
|
||||
|
||||
<p>Restarting Postfix service is required.</p>
|
||||
<h3 id="supports-alias-domains-in-postfix-per-user-bcc-lookup-files">Supports alias domains in Postfix per-user bcc lookup files</h3>
|
||||
<ul>
|
||||
<li>In <code>/etc/postfix/ldap/sender_bcc_maps_user.cf</code>, replace <code>(mail=%s)</code> by
|
||||
<code>(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))</code> in parameter
|
||||
<code>query_filter =</code>. The final LDAP filter looks like below:</li>
|
||||
</ul>
|
||||
<pre><code># Part of file: ldap/sender_bcc_maps_user.cf
|
||||
|
||||
query_filter = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=senderbcc))
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Perform the same modification in file <code>/etc/postfix/ldap/recipient_bcc_maps_user.cf</code>,
|
||||
the final LDAP filter looks like below:</li>
|
||||
</ul>
|
||||
<pre><code># Part of file: ldap/recipient_bcc_maps_user.cf
|
||||
|
||||
query_filter = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=recipientbcc))
|
||||
</code></pre>
|
||||
|
||||
<p>Restarting Postfix service is required.</p>
|
||||
<h3 id="create-addition-sql-index-for-amavisd-database">Create addition SQL index for Amavisd database</h3>
|
||||
<p>We need one new SQL index for Amavisd database, it's used to speed up
|
||||
performance of viewing quarantined mails.</p>
|
||||
<p><strong>Note</strong>: It may take long time if you have many records in sql table <code>amavisd.msgs</code>.</p>
|
||||
<pre><code>$ mysql -uroot -p
|
||||
mysql> USE amavisd;
|
||||
mysql> ALTER TABLE msgs ADD INDEX (quar_type);
|
||||
</code></pre>
|
||||
|
||||
<h2 id="mysql-backend-special">MySQL backend special</h2>
|
||||
<h3 id="add-4-new-columns-used-for-per-user-restriction">Add 4 new columns used for per-user restriction</h3>
|
||||
<p>New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table
|
||||
<code>vmail.mailbox</code>:</p>
|
||||
<ul>
|
||||
<li>allowedsenders</li>
|
||||
<li>rejectedsenders</li>
|
||||
<li>allowedrecipients</li>
|
||||
<li>rejectedrecipients</li>
|
||||
</ul>
|
||||
<p>They're used for per-user restriction. For example, you can now define who can
|
||||
send email to your local user, or your user can send email to which external
|
||||
domains or users.</p>
|
||||
<p>Please login to MySQL server as root user, execute SQL commands to add required
|
||||
columns and indexes.</p>
|
||||
<pre><code># mysql -uroot -p
|
||||
mysql> USE vmail;
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT '';
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT '';
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT '';
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT '';
|
||||
</code></pre>
|
||||
|
||||
<p>Supported formats of sender/recipients are:</p>
|
||||
<ul>
|
||||
<li><code>user@example.com</code>: single user</li>
|
||||
<li><code>@example.com</code>: entire domain</li>
|
||||
<li><code>@.example.com</code>: entire domain and all its sub domains</li>
|
||||
<li><code>@.</code>: any users</li>
|
||||
</ul>
|
||||
<p>Multiple senders/recipients must be separated by comma, for example:</p>
|
||||
<pre><code>sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
|
||||
</code></pre>
|
||||
|
||||
<h3 id="create-addition-sql-index-for-amavisd-database_1">Create addition SQL index for Amavisd database</h3>
|
||||
<p>We need one new SQL index for Amavisd database, it's used to speed up
|
||||
performance of viewing quarantined mails.</p>
|
||||
<p><strong>Note</strong>: It may take long time if you have many records in sql table <code>amavisd.msgs</code>.</p>
|
||||
<pre><code>$ mysql -uroot -p
|
||||
mysql> USE amavisd;
|
||||
mysql> ALTER TABLE msgs ADD INDEX (quar_type);
|
||||
</code></pre>
|
||||
|
||||
<h2 id="postgresql-backend-special">PostgreSQL backend special</h2>
|
||||
<h3 id="add-4-new-columns-used-for-per-user-restriction_1">Add 4 new columns used for per-user restriction</h3>
|
||||
<p>New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table
|
||||
<code>vmail.mailbox</code>:</p>
|
||||
<ul>
|
||||
<li>allowedsenders</li>
|
||||
<li>rejectedsenders</li>
|
||||
<li>allowedrecipients</li>
|
||||
<li>rejectedrecipients</li>
|
||||
</ul>
|
||||
<p>They're used for per-user restriction. For example, you can now define who can
|
||||
send email to your local user, or your user can send email to which external
|
||||
domains or users.</p>
|
||||
<p>Please switch to PostgreSQL daemon user, then execute SQL commands to add
|
||||
required new columns and indexes:</p>
|
||||
<ul>
|
||||
<li>On Linux, PostgreSQL daemon user is <code>postgres</code>.</li>
|
||||
<li>On FreeBSD, PostgreSQL daemon user is <code>pgsql</code>.</li>
|
||||
<li>On OpenBSD, PostgreSQL daemon user is <code>_postgresql</code>.</li>
|
||||
</ul>
|
||||
<pre><code># su - postgres
|
||||
$ psql -d vmail
|
||||
sql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT '';
|
||||
sql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT '';
|
||||
sql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT '';
|
||||
sql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT '';
|
||||
</code></pre>
|
||||
|
||||
<p>Supported formats of sender/recipients are:</p>
|
||||
<ul>
|
||||
<li><code>user@example.com</code>: single user</li>
|
||||
<li><code>@example.com</code>: entire domain</li>
|
||||
<li><code>@.example.com</code>: entire domain and all its sub domains</li>
|
||||
<li><code>@.</code>: any users</li>
|
||||
</ul>
|
||||
<p>Multiple senders/recipients must be separated by comma, for example:</p>
|
||||
<pre><code>sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
|
||||
</code></pre>
|
||||
|
||||
<h3 id="create-addition-sql-index-for-amavisd-database_2">Create addition SQL index for Amavisd database</h3>
|
||||
<p>We need one new SQL index for Amavisd database, it's used to speed up
|
||||
performance of viewing quarantined mails.</p>
|
||||
<p><strong>Note</strong>: It may take long time if you have many records in sql table <code>amavisd.msgs</code>.</p>
|
||||
<p>Please switch to PostgreSQL daemon user, then execute SQL commands to add required columns and indexes:</p>
|
||||
<ul>
|
||||
<li>On Linux, PostgreSQL daemon user is <code>postgres</code>.</li>
|
||||
<li>On FreeBSD, PostgreSQL daemon user is <code>pgsql</code>.</li>
|
||||
<li>On OpenBSD, PostgreSQL daemon user is <code>_postgresql</code>.</li>
|
||||
</ul>
|
||||
<pre><code># su - postgres
|
||||
$ psql -d amavisd
|
||||
sql> CREATE INDEX idx_msgs_quar_type ON msgs (quar_type);
|
||||
</code></pre><br /><p style="text-align: center;">If you found something wrong
|
||||
in this document, please do
|
||||
<a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.</p><p style="text-align: center; color: grey;">This tutorial is published under a <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">CC BY-ND 3.0</a> license.<!-- Google Analytics -->
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-3293801-14");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}
|
||||
</script>
|
||||
</body></html>
|
|
@ -77,7 +77,7 @@ latest stable release immediately: <a href="http://trac.roundcube.net/wiki/Howto
|
|||
<p>iRedAPD-1.4.4 brings several new plugins, and works with Postfix parameter
|
||||
<code>smtpd_end_of_data_restrictions</code> (protocol state <code>END-OF-MESSAGE</code>).</p>
|
||||
<p>Please follow below tutorial to upgrade iRedAPD to the latest stable release:
|
||||
<a href="http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD">How to upgrade iRedAPD-1.4.1 or later versions to iRedAPD-1.4.4</a></p>
|
||||
<a href="http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD">How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release</a></p>
|
||||
<h3 id="upgrade-iredadmin-open-source-edition-to-the-latest-stable-release">Upgrade iRedAdmin (open source edition) to the latest stable release</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>
|
||||
|
|
|
@ -0,0 +1,316 @@
|
|||
# Upgrade iRedMail from 0.8.3 to 0.8.4
|
||||
|
||||
[TOC]
|
||||
|
||||
## ChangeLog
|
||||
|
||||
* 2013-03-28: Update /etc/iredmail-release with iRedMail version number.
|
||||
* 2013-03-28: Upgrade Roundcube webmail to the latest 0.8.6.
|
||||
* 2013-03-25: [ldap] Fix incorrect LDAP query filter in Postfix.
|
||||
* 2013-01-08: [sql] Add 4 new columns in table `vmail.mailbox` for MySQL/PostgreSQL backends.
|
||||
* 2012-10-24: [ldap] Supports alias domains in Postfix per-user bcc lookup files.
|
||||
|
||||
## General (All backends should apply these steps)
|
||||
|
||||
### Update /etc/iredmail-release with 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:
|
||||
|
||||
```
|
||||
# File: /etc/iredmail-release
|
||||
|
||||
0.8.4
|
||||
```
|
||||
|
||||
### Upgrade Roundcube webmail to the latest stable release
|
||||
|
||||
Please follow Roundcube official tutorial to upgrade Roundcube webmail to the
|
||||
latest stable release immediately: [How to upgrade Roundcube](http://trac.roundcube.net/wiki/Howto_Upgrade)
|
||||
|
||||
### Upgrade iRedAPD (Postfix policy server) to the latest stable release
|
||||
|
||||
Please follow below tutorial to upgrade iRedAPD to the latest stable release:
|
||||
[How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release](http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD)
|
||||
|
||||
### Upgrade iRedAdmin (open source edition) to the latest stable release
|
||||
|
||||
Please follow this tutorial to upgrade iRedAdmin open source edition to the
|
||||
latest stable release: [Upgrade iRedAdmin to the latest stable release](./migrate.or.upgrade.iredadmin.html)
|
||||
|
||||
### Add new alias `virusalert` in Postfix for Amavisd
|
||||
|
||||
Amavisd will send an email notification to address `virusalert@[YOUR_HOSTNAME]`
|
||||
by default, but we don't have this user in Postfix alias file
|
||||
`/etc/postfix/aliases` (on Linux/OpenBSD), or /usr/local/etc/postfix/aliases
|
||||
(on FreeBSD) or SQL/LDAP database, so emails cannot be delivered. Below steps
|
||||
add an alias in Postfix alias file, and it will be forwarded to root user by
|
||||
default.
|
||||
|
||||
Add new alias (Note, use '/usr/local/etc/postfix/aliases' on FreeBSD instead),
|
||||
and update the database:
|
||||
|
||||
```
|
||||
# echo 'virusalert: root' >> /etc/postfix/aliases
|
||||
# postalias /etc/postfix/aliases
|
||||
```
|
||||
|
||||
## OpenLDAP backend special
|
||||
|
||||
### Fix incorrect LDAP query filter in Postfix
|
||||
|
||||
If you add external email addresses as mail list members, iRedAdmin-Pro will
|
||||
store them in attribute `memberOfGroup`, this will cause exported LDIF data
|
||||
cannot be restored. Below are steps to fix this issue.
|
||||
|
||||
To fix this issue, we need the latest LDAP schema file provided by iRedMail.
|
||||
Steps are:
|
||||
|
||||
* Download the newest iRedMail ldap schema file
|
||||
* Copy old ldap schema file as a backup copy
|
||||
* Replace the old one
|
||||
* Restart OpenLDAP service.
|
||||
|
||||
Here we go:
|
||||
|
||||
#### Use the latest LDAP schema file provided by iRedMail
|
||||
|
||||
* On RHEL/CentOS/Scientific Linux (both release 5.x and 6.x), openSUSE, Gentoo, OpenBSD:
|
||||
|
||||
```
|
||||
# cd /tmp
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
|
||||
|
||||
# cd /etc/openldap/schema/
|
||||
# cp iredmail.schema iredmail.schema.bak
|
||||
|
||||
# cp -f /tmp/iredmail.schema /etc/openldap/schema/
|
||||
# /etc/init.d/slapd restart # <-- Or: /etc/init.d/ldap restart
|
||||
```
|
||||
|
||||
* On Debian/Ubuntu:
|
||||
|
||||
```
|
||||
# cd /tmp
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
|
||||
|
||||
# cd /etc/ldap/schema/
|
||||
# cp iredmail.schema iredmail.schema.bak
|
||||
|
||||
# cp -f /tmp/iredmail.schema /etc/ldap/schema/
|
||||
# /etc/init.d/slapd restart
|
||||
```
|
||||
|
||||
* On FreeBSD:
|
||||
|
||||
```
|
||||
# cd /tmp
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
|
||||
|
||||
# cd /usr/local/etc/ldap/schema/
|
||||
# cp iredmail.schema iredmail.schema.bak
|
||||
|
||||
# cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
|
||||
# /usr/local/etc/rc.d/slapd restart
|
||||
```
|
||||
|
||||
#### Update existing accounts
|
||||
|
||||
* Download python script used to adding missing values.
|
||||
|
||||
```
|
||||
# cd /root/
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_083_to_084.py
|
||||
```
|
||||
|
||||
Open downloaded file `updateLDAPValues_083_to_084.py`, set LDAP server related
|
||||
settings in file head. for example,
|
||||
|
||||
```
|
||||
# Part of file: updateLDAPValues_083_to_084.py
|
||||
|
||||
uri = 'ldap://127.0.0.1:389'
|
||||
basedn = 'o=domains,dc=example,dc=com'
|
||||
bind_dn = 'cn=vmailadmin,dc=example,dc=com'
|
||||
bind_pw = 'passwd'
|
||||
```
|
||||
|
||||
You can find required LDAP credential in iRedAdmin config file or `iRedMail.tips`
|
||||
file under your iRedMail installation directory. Using either
|
||||
`cn=Manager,dc=xx,dc=xx` or `cn=vmailadmin,dc=xx,dc=xx` as bind dn is ok.
|
||||
|
||||
Execute this script, it will fix incorrect values and add correct ones:
|
||||
|
||||
```
|
||||
# python updateLDAPValues_083_to_084.py
|
||||
```
|
||||
|
||||
#### Fix incorrect LDAP query filter in Postfix
|
||||
|
||||
* On Linux/OpenBSD, please update `/etc/postfix/ldap/virtual_group_maps.cf`.
|
||||
On FreeBSD, update `/usr/local/etc/postfix/ldap/virtual_group_maps.cf` instead.
|
||||
|
||||
```
|
||||
# Part of file: ldap/virtual_group_maps.cf
|
||||
|
||||
# OLD setting
|
||||
#query_filter = (&(memberOfGroup=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailUser)(objectClass=mailExternalUser)))
|
||||
|
||||
# New setting
|
||||
query_filter = (&(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(memberOfGroup=%s)(shadowAddress=%s))(|(objectClass=mailUser)(objectClass=mailExternalUser)))
|
||||
```
|
||||
|
||||
Restarting Postfix service is required.
|
||||
|
||||
### Supports alias domains in Postfix per-user bcc lookup files
|
||||
|
||||
* In `/etc/postfix/ldap/sender_bcc_maps_user.cf`, replace `(mail=%s)` by
|
||||
`(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))` in parameter
|
||||
`query_filter =`. The final LDAP filter looks like below:
|
||||
|
||||
```
|
||||
# Part of file: ldap/sender_bcc_maps_user.cf
|
||||
|
||||
query_filter = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=senderbcc))
|
||||
```
|
||||
|
||||
* Perform the same modification in file `/etc/postfix/ldap/recipient_bcc_maps_user.cf`,
|
||||
the final LDAP filter looks like below:
|
||||
|
||||
```
|
||||
# Part of file: ldap/recipient_bcc_maps_user.cf
|
||||
|
||||
query_filter = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=recipientbcc))
|
||||
```
|
||||
|
||||
Restarting Postfix service is required.
|
||||
|
||||
### Create addition SQL index for Amavisd database
|
||||
|
||||
We need one new SQL index for Amavisd database, it's used to speed up
|
||||
performance of viewing quarantined mails.
|
||||
|
||||
__Note__: It may take long time if you have many records in sql table `amavisd.msgs`.
|
||||
|
||||
```
|
||||
$ mysql -uroot -p
|
||||
mysql> USE amavisd;
|
||||
mysql> ALTER TABLE msgs ADD INDEX (quar_type);
|
||||
```
|
||||
|
||||
## MySQL backend special
|
||||
|
||||
### Add 4 new columns used for per-user restriction
|
||||
|
||||
New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table
|
||||
`vmail.mailbox`:
|
||||
|
||||
* allowedsenders
|
||||
* rejectedsenders
|
||||
* allowedrecipients
|
||||
* rejectedrecipients
|
||||
|
||||
They're used for per-user restriction. For example, you can now define who can
|
||||
send email to your local user, or your user can send email to which external
|
||||
domains or users.
|
||||
|
||||
Please login to MySQL server as root user, execute SQL commands to add required
|
||||
columns and indexes.
|
||||
|
||||
```
|
||||
# mysql -uroot -p
|
||||
mysql> USE vmail;
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT '';
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT '';
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT '';
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT '';
|
||||
```
|
||||
|
||||
Supported formats of sender/recipients are:
|
||||
|
||||
* `user@example.com`: single user
|
||||
* `@example.com`: entire domain
|
||||
* `@.example.com`: entire domain and all its sub domains
|
||||
* `@.`: any users
|
||||
|
||||
Multiple senders/recipients must be separated by comma, for example:
|
||||
|
||||
```
|
||||
sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
|
||||
```
|
||||
|
||||
### Create addition SQL index for Amavisd database
|
||||
|
||||
We need one new SQL index for Amavisd database, it's used to speed up
|
||||
performance of viewing quarantined mails.
|
||||
|
||||
__Note__: It may take long time if you have many records in sql table `amavisd.msgs`.
|
||||
|
||||
```
|
||||
$ mysql -uroot -p
|
||||
mysql> USE amavisd;
|
||||
mysql> ALTER TABLE msgs ADD INDEX (quar_type);
|
||||
```
|
||||
|
||||
## PostgreSQL backend special
|
||||
|
||||
### Add 4 new columns used for per-user restriction
|
||||
|
||||
New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table
|
||||
`vmail.mailbox`:
|
||||
|
||||
* allowedsenders
|
||||
* rejectedsenders
|
||||
* allowedrecipients
|
||||
* rejectedrecipients
|
||||
|
||||
They're used for per-user restriction. For example, you can now define who can
|
||||
send email to your local user, or your user can send email to which external
|
||||
domains or users.
|
||||
|
||||
Please switch to PostgreSQL daemon user, then execute SQL commands to add
|
||||
required new columns and indexes:
|
||||
|
||||
* On Linux, PostgreSQL daemon user is `postgres`.
|
||||
* On FreeBSD, PostgreSQL daemon user is `pgsql`.
|
||||
* On OpenBSD, PostgreSQL daemon user is `_postgresql`.
|
||||
|
||||
```
|
||||
# su - postgres
|
||||
$ psql -d vmail
|
||||
sql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT '';
|
||||
sql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT '';
|
||||
sql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT '';
|
||||
sql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT '';
|
||||
```
|
||||
|
||||
Supported formats of sender/recipients are:
|
||||
|
||||
* `user@example.com`: single user
|
||||
* `@example.com`: entire domain
|
||||
* `@.example.com`: entire domain and all its sub domains
|
||||
* `@.`: any users
|
||||
|
||||
Multiple senders/recipients must be separated by comma, for example:
|
||||
```
|
||||
sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
|
||||
```
|
||||
|
||||
### Create addition SQL index for Amavisd database
|
||||
|
||||
We need one new SQL index for Amavisd database, it's used to speed up
|
||||
performance of viewing quarantined mails.
|
||||
|
||||
__Note__: It may take long time if you have many records in sql table `amavisd.msgs`.
|
||||
|
||||
Please switch to PostgreSQL daemon user, then execute SQL commands to add required columns and indexes:
|
||||
|
||||
* On Linux, PostgreSQL daemon user is `postgres`.
|
||||
* On FreeBSD, PostgreSQL daemon user is `pgsql`.
|
||||
* On OpenBSD, PostgreSQL daemon user is `_postgresql`.
|
||||
```
|
||||
# su - postgres
|
||||
$ psql -d amavisd
|
||||
sql> CREATE INDEX idx_msgs_quar_type ON msgs (quar_type);
|
||||
```
|
|
@ -43,7 +43,7 @@ iRedAPD-1.4.4 brings several new plugins, and works with Postfix parameter
|
|||
`smtpd_end_of_data_restrictions` (protocol state `END-OF-MESSAGE`).
|
||||
|
||||
Please follow below tutorial to upgrade iRedAPD to the latest stable release:
|
||||
[How to upgrade iRedAPD-1.4.1 or later versions to iRedAPD-1.4.4](http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD)
|
||||
[How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release](http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD)
|
||||
|
||||
### Upgrade iRedAdmin (open source edition) to the latest stable release
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* __0.8.7__, released on May 13, 2014. [Release notes](http://www.iredmail.org/forum/topic6872-news-announcements-bug-fixes-iredmail087-has-been-released.html), [Upgrade from iRedMail-0.8.6](./upgrade.iredmail.0.8.6-0.8.7.html)
|
||||
* __0.8.6__, released on Dec 16, 2013. [Release notes](http://www.iredmail.org/forum/topic5831-iredmail086-has-been-released.html), [Upgrade from iRedMail-0.8.5](./upgrade.iredmail.0.8.5-0.8.6.html)
|
||||
* __0.8.5__, released on Jul 16, 2013. [Release notes](http://www.iredmail.org/forum/topic5167-news-announcements-bug-fixes-iredmail085-has-been-released.html), [Upgrade from iRedMail-0.8.4](./upgrade.iredmail.0.8.4-0.8.5.html)
|
||||
* __0.8.4__, released on Mar 26, 2013. [Release notes](http://www.iredmail.org/forum/topic4646-news-announcements-bug-fixes-iredmail084-has-been-released.html), [Upgrade from iRedMail-0.8.3](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.3-0.8.4)
|
||||
* __0.8.4__, released on Mar 26, 2013. [Release notes](http://www.iredmail.org/forum/topic4646-news-announcements-bug-fixes-iredmail084-has-been-released.html), [Upgrade from iRedMail-0.8.3](./upgrade.iredmail.0.8.3-0.8.4.html)
|
||||
* __0.8.3__, released on Oct 13, 2012. [Release notes](http://www.iredmail.org/forum/topic4016-news-announcements-bug-fixes-iredmail083-has-been-released.html), [Upgrade from iRedMail-0.8.2](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.2-0.8.3)
|
||||
* __0.8.2__, released on Sep 19, 2012. [Release notes](http://www.iredmail.org/forum/topic3913-news-announcements-bug-fixes-iredmail082-has-been-released.html), [Upgrade from iRedMail-0.8.1](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.1-0.8.2)
|
||||
* __0.8.1__, released on Jun 8, 2012. [Release notes](http://www.iredmail.org/forum/topic3499-news-announcements-bug-fixes-iredmail081-has-been-released.html), [Upgrade from iRedMail-0.8.0](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.0-0.8.1)
|
||||
|
|
Loading…
Reference in New Issue