New docs: installation/releases.md, upgrade/upgrade.iredmail.0.8.7-0.9.0.md.
This commit is contained in:
parent
6b8e61c0b8
commit
75cb5b421d
|
@ -5,6 +5,7 @@ We're migrating [old wiki documents](http://www.iredmail.org/wiki) to Markdown f
|
|||
* [Install iRedMail on FreeBSD](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/2-install.iredmail.on.freebsd.md)
|
||||
* [Install iRedMail on FreeBSD inside Jail (with ezjail)](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/3-install.iredmail.on.freebsd.with.jail.md)
|
||||
* [Install iRedMail on OpenBSD](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/4-install.iredmail.on.openbsd.md)
|
||||
* [Release notes and upgrade tutorials](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/releases.md)
|
||||
* [Setup DNS records for your iRedMail server](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/setup.dns.md)
|
||||
* [Perform silent/unattended iRedMail installation](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/unattended.iredmail.installation.md)
|
||||
# Configure mail client applications
|
||||
|
|
2
TODO.md
2
TODO.md
|
@ -2,7 +2,6 @@
|
|||
|
||||
# New
|
||||
|
||||
* http://www.iredmail.org/wiki/index.php?title=Install/iRedMail/FreeBSD.Jail
|
||||
* 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.
|
||||
|
@ -41,6 +40,7 @@
|
|||
* ~~http://www.iredmail.org/install_iredmail_on_debian.html~~
|
||||
* ~~http://www.iredmail.org/install_iredmail_on_ubuntu.html~~
|
||||
* ~~http://www.iredmail.org/install_iredmail_on_freebsd.html~~
|
||||
* ~~ http://www.iredmail.org/wiki/index.php?title=Install/iRedMail/FreeBSD.Jail ~~
|
||||
* ~~http://www.iredmail.org/install_iredmail_on_openbsd.html~~
|
||||
* ~~ http://www.iredmail.org/install_iredmail_on_rhel.html ~~
|
||||
* ~~ https://code.google.com/p/iredmail/wiki/DNS_DKIM ~~
|
||||
|
|
44
convert.sh
44
convert.sh
|
@ -34,6 +34,7 @@ strip_name_prefix()
|
|||
|
||||
# Chapter directories in specified order
|
||||
all_chapter_dirs="installation \
|
||||
upgrade \
|
||||
mua \
|
||||
howto \
|
||||
integrations \
|
||||
|
@ -52,6 +53,10 @@ for chapter_dir in ${all_chapter_dirs}; do
|
|||
# Get articles
|
||||
all_chapter_articles="$(find ${chapter_dir} -depth 1 -type f -iname '[0-9a-z]*.md')"
|
||||
|
||||
# Don't show chapter title and articles in index page.
|
||||
hide_in_index='NO'
|
||||
[ -f ${chapter_dir}/_hide_in_index ] && hide_in_index='YES'
|
||||
|
||||
# Output directory.
|
||||
# Remove prefix '[number]-' in chapter directory name.
|
||||
#chapter_dir_in_article="$(strip_name_prefix ${chapter_dir})"
|
||||
|
@ -61,16 +66,18 @@ for chapter_dir in ${all_chapter_dirs}; do
|
|||
_title_md="${chapter_dir}/_title.md"
|
||||
_summary_md="${chapter_dir}/_summary.md"
|
||||
|
||||
if [ -f ${_title_md} ]; then
|
||||
# generate index info of chapter
|
||||
_chapter_title="$(cat ${_title_md})"
|
||||
echo -e "### ${_chapter_title}" >> ${INDEX_MD}
|
||||
echo -e "# ${_chapter_title}" >> ${README_MD}
|
||||
if [ X"${hide_in_index}" != X'YES' ]; then
|
||||
if [ -f ${_title_md} ]; then
|
||||
# generate index info of chapter
|
||||
_chapter_title="$(cat ${_title_md})"
|
||||
echo -e "### ${_chapter_title}" >> ${INDEX_MD}
|
||||
echo -e "# ${_chapter_title}" >> ${README_MD}
|
||||
|
||||
if [ -f ${_summary_md} ]; then
|
||||
_chapter_summary="$(cat ${_summary_md})"
|
||||
echo -e "${_chapter_summary}" >> ${INDEX_MD}
|
||||
echo -e "${_chapter_summary}" >> ${README_MD}
|
||||
if [ -f ${_summary_md} ]; then
|
||||
_chapter_summary="$(cat ${_summary_md})"
|
||||
echo -e "${_chapter_summary}" >> ${INDEX_MD}
|
||||
echo -e "${_chapter_summary}" >> ${README_MD}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -90,10 +97,12 @@ for chapter_dir in ${all_chapter_dirs}; do
|
|||
#_article_title="$(head -1 ${article_file} | awk -F'Title: ' '{print $2}')"
|
||||
#echo "article title: ${_article_title}"
|
||||
#echo "* [${_article_title}](${chapter_dir_in_article}/${article_html_file})" >> ${INDEX_MD}
|
||||
echo "* [${_article_title}](${article_html_file})" >> ${INDEX_MD}
|
||||
if [ X"${hide_in_index}" != X'YES' ]; then
|
||||
echo "* [${_article_title}](${article_html_file})" >> ${INDEX_MD}
|
||||
|
||||
# 'src/default/' is path to view source file on bitbucket.org
|
||||
echo "* [${_article_title}](https://bitbucket.org/zhb/docs.iredmail.org/src/default/${article_file_without_prefix_path})" >> ${README_MD}
|
||||
# 'src/default/' is path to view source file on bitbucket.org
|
||||
echo "* [${_article_title}](https://bitbucket.org/zhb/docs.iredmail.org/src/default/${article_file_without_prefix_path})" >> ${README_MD}
|
||||
fi
|
||||
|
||||
# Convert file if it was modified
|
||||
echo ${CHANGED_FILES} | grep ${article_file} > /dev/null
|
||||
|
@ -113,13 +122,14 @@ for chapter_dir in ${all_chapter_dirs}; do
|
|||
done
|
||||
|
||||
# Append addition links at the chapter bottom on index page.
|
||||
_links_md="${chapter_dir}/_links.md"
|
||||
if [ X"${hide_in_index}" != X'YES' ]; then
|
||||
_links_md="${chapter_dir}/_links.md"
|
||||
|
||||
if [ -f ${_links_md} ]; then
|
||||
cat ${_links_md} >> ${INDEX_MD}
|
||||
cat ${_links_md} >> ${README_MD}
|
||||
if [ -f ${_links_md} ]; then
|
||||
cat ${_links_md} >> ${INDEX_MD}
|
||||
cat ${_links_md} >> ${README_MD}
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
#cd ${OUTPUT_DIR}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<li><a href="install.iredmail.on.freebsd.html">Install iRedMail on FreeBSD</a></li>
|
||||
<li><a href="install.iredmail.on.freebsd.with.jail.html">Install iRedMail on FreeBSD inside Jail (with ezjail)</a></li>
|
||||
<li><a href="install.iredmail.on.openbsd.html">Install iRedMail on OpenBSD</a></li>
|
||||
<li><a href="releases.html">Release notes and upgrade tutorials</a></li>
|
||||
<li><a href="setup.dns.html">Setup DNS records for your iRedMail server</a></li>
|
||||
<li><a href="unattended.iredmail.installation.html">Perform silent/unattended iRedMail installation</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Release notes and upgrade tutorials</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="release-notes-and-upgrade-tutorials">Release notes and upgrade tutorials</h1>
|
||||
<h2 id="iredmail">iRedMail</h2>
|
||||
<ul>
|
||||
<li><strong>0.9.0</strong>, released on Dec ??, 2014. <a href="">Release notes</a>, <a href="./upgrade.iredmail.0.8.7-0.9.0.html">Upgrade from iRedMail-0.8.7</a></li>
|
||||
<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="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.6-0.8.7">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="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.5-0.8.6">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="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.4-0.8.5">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.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>
|
||||
<li><strong>0.8.0</strong>, released on May 10, 2012. <a href="http://www.iredmail.org/forum/topic3345.html">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-0.8.0">Upgrade from iRedMail-0.7.4</a></li>
|
||||
<li><strong>0.7.4</strong>, released on Jan 9, 2012. <a href="http://www.iredmail.org/forum/topic2816-iredmail074-has-been-released.html">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.3-0.7.4">Upgrade from iRedMail-0.7.3</a></li>
|
||||
<li><strong>0.7.3</strong>, released on Aug 17, 2011. <a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.3">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.2-0.7.3">Upgrade from iRedMail-0.7.2</a></li>
|
||||
<li><strong>0.7.2</strong>, released on Jun 10, 2011. <a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.2">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.1-0.7.2">Upgrade from iRedMail-0.7.1</a></li>
|
||||
<li><strong>0.7.1</strong>, released on May 1, 2011. <a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.1">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.0-0.7.1">Upgrade from iRedMail-0.7.0</a></li>
|
||||
<li><strong>0.7.0</strong>, released on Apr 1, 2011. <a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.0">Release notes</a>, <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.6.1-0.7.0">Upgrade from iRedMail-0.6.1</a></li>
|
||||
<li>0.6.1, released on Aug 14, 2010. <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.6.0-0.6.1">Upgrade from iRedMail-0.6.0</a></li>
|
||||
<li>0.6.0, released on May 31, 2010. <a href="http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.5.1-0.6.0">Upgrade from iRedMail-0.5.1</a></li>
|
||||
<li>0.5.1, released on Oct 31, 2009. <a href="http://www.iredmail.org/upgrade_050_051.html">Upgrade from iRedMail-0.5.1</a></li>
|
||||
<li>0.5.0, released on Aug 16, 2009. <a href="http://code.google.com/p/iredmail/wiki/Upgrade_040_050">Upgrade from iRedMail-0.5.1</a></li>
|
||||
<li>0.4.0, released on Mar 10, 2009. <a href="http://code.google.com/p/iredmail/wiki/Upgrade_032_040">Upgrade from iRedMail-0.3.2</a></li>
|
||||
<li>0.3.2, released on Dec 11, 2008.</li>
|
||||
<li>0.3.1, released on Oct 21, 2008.</li>
|
||||
<li>0.3.0, released on Sep 22, 2008.</li>
|
||||
<li>0.2, released on Aug 20, 2008.</li>
|
||||
<li>0.1, released on Jun 28, 2008.</li>
|
||||
</ul><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>
|
|
@ -0,0 +1,292 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Upgrade iRedMail from 0.8.7 to 0.9.0</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-087-to-090">Upgrade iRedMail from 0.8.7 to 0.9.0</h1>
|
||||
<div class="toc">
|
||||
<ul>
|
||||
<li><a href="#upgrade-iredmail-from-087-to-090">Upgrade iRedMail from 0.8.7 to 0.9.0</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="#fix-improper-postfix-setting-in-both-maincf-and-mastercf">Fix improper Postfix setting in both main.cf and master.cf</a></li>
|
||||
<li><a href="#fix-improper-file-permission-of-amavisd-config-file">Fix improper file permission of Amavisd config file</a></li>
|
||||
<li><a href="#fix-incorrect-setting-to-enable-daily-cron-job-to-update-spamassassin-rules">Fix incorrect setting to enable daily cron job to update SpamAssassin rules</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#openldap-backend-special">OpenLDAP backend special</a><ul>
|
||||
<li><a href="#fix-improper-ldap-query-command-in-domain-transport-query-file">Fix improper LDAP query command in domain transport query file</a></li>
|
||||
<li><a href="#add-new-ldap-values-for-existing-mail-users">Add new LDAP values for existing mail users</a></li>
|
||||
<li><a href="#add-index-for-sql-column-in-amavisd-database">Add index for SQL column in amavisd database</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#mysql-backend-special">MySQL backend special</a><ul>
|
||||
<li><a href="#fix-improper-sql-query-command-in-domain-transport-query-file">Fix improper SQL query command in domain transport query file</a></li>
|
||||
<li><a href="#add-and-remove-sql-columns-in-vmail-and-amavisd-databases">Add and remove SQL columns in vmail and amavisd databases</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#postgresql-backend-special">PostgreSQL backend special</a><ul>
|
||||
<li><a href="#fix-improper-sql-query-command-in-domain-transport-query-file_1">Fix improper SQL query command in domain transport query file</a></li>
|
||||
<li><a href="#add-and-remove-sql-columns-in-vmail-and-amavisd-databases_1">Add and remove SQL columns in vmail and amavisd databases</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p><strong>STILL WORKING IN PROGRESS, DO NOT APPLY IT.</strong></p>
|
||||
<h2 id="changelog">ChangeLog</h2>
|
||||
<ul>
|
||||
<li>2014-11-13: [All backends] Add index for SQL column <code>msgs.spam_level</code> in <code>amavisd</code> database.</li>
|
||||
<li>2014-11-06: [All backends] Fix improper SQL query command in domain transport query file.</li>
|
||||
<li>2014-09-09: [All backends] Fix incorrect setting to enable daily cron job to update SpamAssassin rules.</li>
|
||||
<li>2014-09-09: [All backends] Fix improper permission of Amavisd config file.</li>
|
||||
<li>2014-07-15: [All backends] Fix improper Postfix setting in both main.cf and master.cf.</li>
|
||||
<li>2014-06-19: [All backends] Add index for SQL column <code>policy.policy_name</code> in <code>amavisd</code> database.</li>
|
||||
<li>2014-06-07:<ul>
|
||||
<li>[OpenLDAP] Add new value for existing mail users: enabledService=indexer-worker.</li>
|
||||
<li>[MySQL/PostgreSQL] New SQL column in <code>vmail</code> database: mailbox.enableindexer-worker.</li>
|
||||
</ul>
|
||||
</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.9.0
|
||||
</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="fix-improper-postfix-setting-in-both-maincf-and-mastercf">Fix improper Postfix setting in both main.cf and master.cf</h3>
|
||||
<p>Currently, we don't have Postfix parameter <code>receive_override_options=</code> set in
|
||||
<code>/etc/postfix/main.cf</code>, instead, we have it in transport <code>127.0.0.1:10025</code>
|
||||
(Amavisd) like this:</p>
|
||||
<pre><code># Part of file: /etc/postfix/master.cf
|
||||
|
||||
127.0.0.1:10025 inet n - - - - smtpd
|
||||
...
|
||||
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
|
||||
</code></pre>
|
||||
|
||||
<p>Without <code>receive_override_options=no_address_mappings</code> in <code>main.cf</code>:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Postfix will enable canonical address mapping, virtual alias map expansion,
|
||||
address masquerading, and automatic BCC (blind carbon-copy) recipients
|
||||
<strong>BEFORE</strong> injecting emails to content filter (Amavisd, in our case). For
|
||||
example, if you forward email to 3 email addresses, Postfix will expand the
|
||||
original recipient to 3 recipients, then Amavisd will get 3 emails for
|
||||
scanning. But with <code>receive_override_options=no_address_mappings</code>, Postfix
|
||||
won't expand original recipient to 3 addresses, and Amavisd gets only 1 email
|
||||
for scanning. It slightly improves mail server performance.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>If a blacklisted sender (stored in Amavisd SQL database, not in
|
||||
Policyd/Cluebringer) sends email to user who forwards email to other
|
||||
addresses, Amavisd will quarantine the one sent to original recipient, but
|
||||
bypass emails sent to forwarded addresses.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Please apply below steps to fix above issues:</p>
|
||||
<ul>
|
||||
<li>Add <code>receive_override_options</code> in Postfix with below shell command:</li>
|
||||
</ul>
|
||||
<pre><code># postconf -e receive_override_options='no_address_mappings'
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Open file <code>/etc/postfix/master.cf</code> (On Linux/OpenBSD) or
|
||||
<code>/usr/local/etc/postfix/master.cf</code> (on FreeBSD), find setting for transport
|
||||
<code>127.0.0.1:10025</code>, remove <code>no_address_mappings</code> for its
|
||||
<code>receive_override_options</code> option:</li>
|
||||
</ul>
|
||||
<pre><code># Part of file: /etc/postfix/master.cf
|
||||
|
||||
# ORIGINAL setting
|
||||
# -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
|
||||
|
||||
# MODIFIED setting
|
||||
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Restart Postfix service.</li>
|
||||
</ul>
|
||||
<p><strong>IMPORTANT NOTE</strong>: If you want to disable <code>content_filter=</code> in Postfix, please
|
||||
comment out <code>receive_override_options=</code> in Postfix config file <code>main.cf</code> too,
|
||||
otherwise canonical address mapping, virtual alias map expansion, address
|
||||
masquerading, and automatic BCC (blind carbon-copy) recipients will not work.</p>
|
||||
<h3 id="fix-improper-file-permission-of-amavisd-config-file">Fix improper file permission of Amavisd config file</h3>
|
||||
<p><strong>NOTE</strong>: This step is applicable to only Red Hat/CentOS 6.</p>
|
||||
<p>Amavisd config file <code>/etc/amavisd/amavisd.conf</code> must be owned by group <code>amavis</code>,
|
||||
otherwise after you upgraded to Red Hat/CentOS 7, Amavisd service cannot start.</p>
|
||||
<pre><code># chgrp amavis /etc/amavisd/amavisd.conf
|
||||
</code></pre>
|
||||
|
||||
<h3 id="fix-incorrect-setting-to-enable-daily-cron-job-to-update-spamassassin-rules">Fix incorrect setting to enable daily cron job to update SpamAssassin rules</h3>
|
||||
<p><strong>NOTE</strong>: This step is applicable to only Debian and Ubuntu.</p>
|
||||
<p>Please update file <code>/etc/default/spamassassin</code> to set <code>CRON=1</code>, so that
|
||||
SpamAssassin daily cron job will update SpamAssassin rules automatically.</p>
|
||||
<pre><code># Part of file: /etc/default/spamassassin
|
||||
|
||||
CRON=1
|
||||
</code></pre>
|
||||
|
||||
<h2 id="openldap-backend-special">OpenLDAP backend special</h2>
|
||||
<h3 id="fix-improper-ldap-query-command-in-domain-transport-query-file">Fix improper LDAP query command in domain transport query file</h3>
|
||||
<p>Please open file <code>/etc/postfix/ldap/transport_maps_domain.cf</code> (on Linux/OpenBSD)
|
||||
or <code>/usr/local/etc/postfix/ldap/transport_maps_domain.cf</code> (on FreeBSD), add
|
||||
addition LDAP filter <code>(!(domainBackupMX=yes))</code> in <code>query =</code> parameter:</p>
|
||||
<pre><code># Part of file: /etc/postfix/ldap/transport_maps_domain.cf
|
||||
|
||||
# OLD setting
|
||||
#query_filter = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s)))
|
||||
|
||||
# NEW setting
|
||||
query_filter = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s))(!(domainBackupMX=yes)))
|
||||
</code></pre>
|
||||
|
||||
<p>Restarting Postfix service is required.</p>
|
||||
<h3 id="add-new-ldap-values-for-existing-mail-users">Add new LDAP values for existing mail users</h3>
|
||||
<p>We will add new LDAP attribute/value pair for existing mail users:
|
||||
<code>enabledService=indexer-worker</code>. It's used by Dovecot.</p>
|
||||
<ul>
|
||||
<li>Download below python script to adding new values for existing mail users.</li>
|
||||
</ul>
|
||||
<pre><code># cd /root/
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_087_to_090.py
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Open downloaded file <code>updateLDAPValues_087_to_090.py</code>, set LDAP server related
|
||||
settings in this file. For example:</li>
|
||||
</ul>
|
||||
<pre><code># Part of file: updateLDAPValues_087_to_090.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>
|
||||
<ul>
|
||||
<li>Execute this script, it will fix incorrect values and add correct ones:</li>
|
||||
</ul>
|
||||
<pre><code># python updateLDAPValues_087_to_090.py
|
||||
</code></pre>
|
||||
|
||||
<p>That's all.</p>
|
||||
<h3 id="add-index-for-sql-column-in-amavisd-database">Add index for SQL column in <code>amavisd</code> database</h3>
|
||||
<p>We need indexes for some SQL columns in <code>amavisd</code> database:
|
||||
<code>policy.policy_name</code>, <code>msgs.spam_level</code>. Both are used by iRedAdmin-Pro.</p>
|
||||
<p>Now connect to SQL server as MySQL root user, create new columns, add required INDEX:</p>
|
||||
<pre><code>$ mysql -uroot -p
|
||||
mysql> USE amavisd;
|
||||
mysql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
|
||||
mysql> CREATE INDEX msgs_idx_spam_level ON msgs (spam_level);
|
||||
</code></pre>
|
||||
|
||||
<h2 id="mysql-backend-special">MySQL backend special</h2>
|
||||
<h3 id="fix-improper-sql-query-command-in-domain-transport-query-file">Fix improper SQL query command in domain transport query file</h3>
|
||||
<p>Please open file <code>/etc/postfix/mysql/transport_maps_domain.cf</code> (on Linux/OpenBSD)
|
||||
or <code>/usr/local/etc/postfix/mysql/transport_maps_domain.cf</code> (on FreeBSD), add
|
||||
addition SQL statement <code>AND backupmx=0</code> in <code>query =</code> parameter:</p>
|
||||
<pre><code># Part of file: /etc/postfix/mysql/transport_maps_domain.cf
|
||||
|
||||
# OLD setting
|
||||
#query = SELECT transport FROM domain WHERE domain='%s' AND active=1
|
||||
|
||||
# NEW setting
|
||||
query = SELECT transport FROM domain WHERE domain='%s' AND active=1 AND backupmx=0
|
||||
</code></pre>
|
||||
|
||||
<p>Restarting Postfix service is required.</p>
|
||||
<h3 id="add-and-remove-sql-columns-in-vmail-and-amavisd-databases">Add and remove SQL columns in <code>vmail</code> and <code>amavisd</code> databases</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>We need new SQL columns in <code>vmail</code> database: <code>mailbox.enableindexer-worker</code>,
|
||||
it's used by Dovecot.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>We need new indexes for some 2 columns in <code>amavisd</code> database:
|
||||
<code>policy.policy_name</code>, <code>msgs.spam_level</code>. Both are used by iRedAdmin-Pro.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Now connect to SQL server as MySQL root user, create new columns, add required
|
||||
indexes:</p>
|
||||
<pre><code>$ mysql -uroot -p
|
||||
mysql> USE vmail;
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN `enableindexer-worker` TINYINT(1) NOT NULL DEFAULT 1;
|
||||
mysql> ALTER TABLE mailbox ADD INDEX (`enableindexer-worker`);
|
||||
|
||||
mysql> USE amavisd;
|
||||
mysql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
|
||||
mysql> CREATE INDEX msgs_idx_spam_level ON msgs (spam_level);
|
||||
</code></pre>
|
||||
|
||||
<h2 id="postgresql-backend-special">PostgreSQL backend special</h2>
|
||||
<h3 id="fix-improper-sql-query-command-in-domain-transport-query-file_1">Fix improper SQL query command in domain transport query file</h3>
|
||||
<p>Please open file <code>/etc/postfix/pgsql/transport_maps_domain.cf</code> (on Linux/OpenBSD)
|
||||
or <code>/usr/local/etc/postfix/pgsql/transport_maps_domain.cf</code> (on FreeBSD), add
|
||||
addition SQL statement <code>AND backupmx=0</code> in <code>query =</code> parameter:</p>
|
||||
<pre><code># Part of file: /etc/postfix/pgsql/transport_maps_domain.cf
|
||||
|
||||
# OLD setting
|
||||
#query = SELECT transport FROM domain WHERE domain='%s' AND active=1
|
||||
|
||||
# NEW setting
|
||||
query = SELECT transport FROM domain WHERE domain='%s' AND active=1 AND backupmx=0
|
||||
</code></pre>
|
||||
|
||||
<p>Restarting Postfix service is required.</p>
|
||||
<h3 id="add-and-remove-sql-columns-in-vmail-and-amavisd-databases_1">Add and remove SQL columns in <code>vmail</code> and <code>amavisd</code> databases</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>We need new SQL columns in <code>vmail</code> database: <code>mailbox.enableindexer-worker</code>,
|
||||
it's used by Dovecot.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>We need new indexes for some 2 columns in <code>amavisd</code> database:
|
||||
<code>policy.policy_name</code>, <code>msgs.spam_level</code>. Both are used by iRedAdmin-Pro.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Now connect to SQL server as PostgreSQL admin user, create new columns, add
|
||||
required indexes:</p>
|
||||
<pre><code># su - postgres
|
||||
$ psql -d vmail
|
||||
sql> ALTER TABLE mailbox ADD COLUMN enableindexer-worker INT2 NOT NULL DEFAULT 1;
|
||||
sql> CREATE INDEX idx_mailbox_enableindexer_worker ON mailbox (enableindexer-worker);
|
||||
|
||||
sql> \c amavisd;
|
||||
sql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
|
||||
sql> CREATE INDEX msgs_idx_spam_level ON msgs (spam_level);
|
||||
</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>
|
|
@ -0,0 +1,28 @@
|
|||
# Release notes and upgrade tutorials
|
||||
|
||||
## iRedMail
|
||||
|
||||
* __0.9.0__, released on Dec ??, 2014. [Release notes](), [Upgrade from iRedMail-0.8.7](./upgrade.iredmail.0.8.7-0.9.0.html)
|
||||
* __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](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.6-0.8.7)
|
||||
* __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](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.5-0.8.6)
|
||||
* __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](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.4-0.8.5)
|
||||
* __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.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)
|
||||
* __0.8.0__, released on May 10, 2012. [Release notes](http://www.iredmail.org/forum/topic3345.html), [Upgrade from iRedMail-0.7.4](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-0.8.0)
|
||||
* __0.7.4__, released on Jan 9, 2012. [Release notes](http://www.iredmail.org/forum/topic2816-iredmail074-has-been-released.html), [Upgrade from iRedMail-0.7.3](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.3-0.7.4)
|
||||
* __0.7.3__, released on Aug 17, 2011. [Release notes](http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.3), [Upgrade from iRedMail-0.7.2](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.2-0.7.3)
|
||||
* __0.7.2__, released on Jun 10, 2011. [Release notes](http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.2), [Upgrade from iRedMail-0.7.1](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.1-0.7.2)
|
||||
* __0.7.1__, released on May 1, 2011. [Release notes](http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.1), [Upgrade from iRedMail-0.7.0](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.0-0.7.1)
|
||||
* __0.7.0__, released on Apr 1, 2011. [Release notes](http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedMail/0.7.0), [Upgrade from iRedMail-0.6.1](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.6.1-0.7.0)
|
||||
* 0.6.1, released on Aug 14, 2010. [Upgrade from iRedMail-0.6.0](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.6.0-0.6.1)
|
||||
* 0.6.0, released on May 31, 2010. [Upgrade from iRedMail-0.5.1](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.5.1-0.6.0)
|
||||
* 0.5.1, released on Oct 31, 2009. [Upgrade from iRedMail-0.5.1](http://www.iredmail.org/upgrade_050_051.html)
|
||||
* 0.5.0, released on Aug 16, 2009. [Upgrade from iRedMail-0.5.1](http://code.google.com/p/iredmail/wiki/Upgrade_040_050)
|
||||
* 0.4.0, released on Mar 10, 2009. [Upgrade from iRedMail-0.3.2](http://code.google.com/p/iredmail/wiki/Upgrade_032_040)
|
||||
* 0.3.2, released on Dec 11, 2008.
|
||||
* 0.3.1, released on Oct 21, 2008.
|
||||
* 0.3.0, released on Sep 22, 2008.
|
||||
* 0.2, released on Aug 20, 2008.
|
||||
* 0.1, released on Jun 28, 2008.
|
|
@ -0,0 +1,275 @@
|
|||
# Upgrade iRedMail from 0.8.7 to 0.9.0
|
||||
|
||||
[TOC]
|
||||
|
||||
|
||||
__STILL WORKING IN PROGRESS, DO NOT APPLY IT.__
|
||||
|
||||
|
||||
## ChangeLog
|
||||
|
||||
* 2014-11-13: [All backends] Add index for SQL column `msgs.spam_level` in `amavisd` database.
|
||||
* 2014-11-06: [All backends] Fix improper SQL query command in domain transport query file.
|
||||
* 2014-09-09: [All backends] Fix incorrect setting to enable daily cron job to update SpamAssassin rules.
|
||||
* 2014-09-09: [All backends] Fix improper permission of Amavisd config file.
|
||||
* 2014-07-15: [All backends] Fix improper Postfix setting in both main.cf and master.cf.
|
||||
* 2014-06-19: [All backends] Add index for SQL column `policy.policy_name` in `amavisd` database.
|
||||
* 2014-06-07:
|
||||
* [OpenLDAP] Add new value for existing mail users: enabledService=indexer-worker.
|
||||
* [MySQL/PostgreSQL] New SQL column in `vmail` database: mailbox.enableindexer-worker.
|
||||
|
||||
## 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.9.0
|
||||
```
|
||||
|
||||
### 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)
|
||||
|
||||
### Fix improper Postfix setting in both main.cf and master.cf
|
||||
|
||||
Currently, we don't have Postfix parameter `receive_override_options=` set in
|
||||
`/etc/postfix/main.cf`, instead, we have it in transport `127.0.0.1:10025`
|
||||
(Amavisd) like this:
|
||||
|
||||
```
|
||||
# Part of file: /etc/postfix/master.cf
|
||||
|
||||
127.0.0.1:10025 inet n - - - - smtpd
|
||||
...
|
||||
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
|
||||
```
|
||||
|
||||
Without `receive_override_options=no_address_mappings` in `main.cf`:
|
||||
|
||||
* Postfix will enable canonical address mapping, virtual alias map expansion,
|
||||
address masquerading, and automatic BCC (blind carbon-copy) recipients
|
||||
__BEFORE__ injecting emails to content filter (Amavisd, in our case). For
|
||||
example, if you forward email to 3 email addresses, Postfix will expand the
|
||||
original recipient to 3 recipients, then Amavisd will get 3 emails for
|
||||
scanning. But with `receive_override_options=no_address_mappings`, Postfix
|
||||
won't expand original recipient to 3 addresses, and Amavisd gets only 1 email
|
||||
for scanning. It slightly improves mail server performance.
|
||||
|
||||
* If a blacklisted sender (stored in Amavisd SQL database, not in
|
||||
Policyd/Cluebringer) sends email to user who forwards email to other
|
||||
addresses, Amavisd will quarantine the one sent to original recipient, but
|
||||
bypass emails sent to forwarded addresses.
|
||||
|
||||
Please apply below steps to fix above issues:
|
||||
|
||||
* Add `receive_override_options` in Postfix with below shell command:
|
||||
|
||||
```
|
||||
# postconf -e receive_override_options='no_address_mappings'
|
||||
```
|
||||
|
||||
* Open file `/etc/postfix/master.cf` (On Linux/OpenBSD) or
|
||||
`/usr/local/etc/postfix/master.cf` (on FreeBSD), find setting for transport
|
||||
`127.0.0.1:10025`, remove `no_address_mappings` for its
|
||||
`receive_override_options` option:
|
||||
|
||||
```
|
||||
# Part of file: /etc/postfix/master.cf
|
||||
|
||||
# ORIGINAL setting
|
||||
# -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
|
||||
|
||||
# MODIFIED setting
|
||||
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
|
||||
```
|
||||
|
||||
* Restart Postfix service.
|
||||
|
||||
__IMPORTANT NOTE__: If you want to disable `content_filter=` in Postfix, please
|
||||
comment out `receive_override_options=` in Postfix config file `main.cf` too,
|
||||
otherwise canonical address mapping, virtual alias map expansion, address
|
||||
masquerading, and automatic BCC (blind carbon-copy) recipients will not work.
|
||||
|
||||
### Fix improper file permission of Amavisd config file
|
||||
|
||||
__NOTE__: This step is applicable to only Red Hat/CentOS 6.
|
||||
|
||||
Amavisd config file `/etc/amavisd/amavisd.conf` must be owned by group `amavis`,
|
||||
otherwise after you upgraded to Red Hat/CentOS 7, Amavisd service cannot start.
|
||||
|
||||
```
|
||||
# chgrp amavis /etc/amavisd/amavisd.conf
|
||||
```
|
||||
|
||||
### Fix incorrect setting to enable daily cron job to update SpamAssassin rules
|
||||
|
||||
__NOTE__: This step is applicable to only Debian and Ubuntu.
|
||||
|
||||
Please update file `/etc/default/spamassassin` to set `CRON=1`, so that
|
||||
SpamAssassin daily cron job will update SpamAssassin rules automatically.
|
||||
|
||||
```
|
||||
# Part of file: /etc/default/spamassassin
|
||||
|
||||
CRON=1
|
||||
```
|
||||
|
||||
## OpenLDAP backend special
|
||||
|
||||
### Fix improper LDAP query command in domain transport query file
|
||||
|
||||
Please open file `/etc/postfix/ldap/transport_maps_domain.cf` (on Linux/OpenBSD)
|
||||
or `/usr/local/etc/postfix/ldap/transport_maps_domain.cf` (on FreeBSD), add
|
||||
addition LDAP filter `(!(domainBackupMX=yes))` in `query =` parameter:
|
||||
|
||||
```
|
||||
# Part of file: /etc/postfix/ldap/transport_maps_domain.cf
|
||||
|
||||
# OLD setting
|
||||
#query_filter = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s)))
|
||||
|
||||
# NEW setting
|
||||
query_filter = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s))(!(domainBackupMX=yes)))
|
||||
```
|
||||
|
||||
Restarting Postfix service is required.
|
||||
|
||||
### Add new LDAP values for existing mail users
|
||||
|
||||
We will add new LDAP attribute/value pair for existing mail users:
|
||||
`enabledService=indexer-worker`. It's used by Dovecot.
|
||||
|
||||
* Download below python script to adding new values for existing mail users.
|
||||
|
||||
```
|
||||
# cd /root/
|
||||
# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_087_to_090.py
|
||||
```
|
||||
|
||||
* Open downloaded file `updateLDAPValues_087_to_090.py`, set LDAP server related
|
||||
settings in this file. For example:
|
||||
|
||||
```
|
||||
# Part of file: updateLDAPValues_087_to_090.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_087_to_090.py
|
||||
```
|
||||
|
||||
That's all.
|
||||
|
||||
### Add index for SQL column in `amavisd` database
|
||||
|
||||
We need indexes for some SQL columns in `amavisd` database:
|
||||
`policy.policy_name`, `msgs.spam_level`. Both are used by iRedAdmin-Pro.
|
||||
|
||||
Now connect to SQL server as MySQL root user, create new columns, add required INDEX:
|
||||
|
||||
```
|
||||
$ mysql -uroot -p
|
||||
mysql> USE amavisd;
|
||||
mysql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
|
||||
mysql> CREATE INDEX msgs_idx_spam_level ON msgs (spam_level);
|
||||
```
|
||||
|
||||
## MySQL backend special
|
||||
|
||||
### Fix improper SQL query command in domain transport query file
|
||||
|
||||
Please open file `/etc/postfix/mysql/transport_maps_domain.cf` (on Linux/OpenBSD)
|
||||
or `/usr/local/etc/postfix/mysql/transport_maps_domain.cf` (on FreeBSD), add
|
||||
addition SQL statement `AND backupmx=0` in `query =` parameter:
|
||||
|
||||
```
|
||||
# Part of file: /etc/postfix/mysql/transport_maps_domain.cf
|
||||
|
||||
# OLD setting
|
||||
#query = SELECT transport FROM domain WHERE domain='%s' AND active=1
|
||||
|
||||
# NEW setting
|
||||
query = SELECT transport FROM domain WHERE domain='%s' AND active=1 AND backupmx=0
|
||||
```
|
||||
|
||||
Restarting Postfix service is required.
|
||||
|
||||
### Add and remove SQL columns in `vmail` and `amavisd` databases
|
||||
|
||||
* We need new SQL columns in `vmail` database: `mailbox.enableindexer-worker`,
|
||||
it's used by Dovecot.
|
||||
|
||||
* We need new indexes for some 2 columns in `amavisd` database:
|
||||
`policy.policy_name`, `msgs.spam_level`. Both are used by iRedAdmin-Pro.
|
||||
|
||||
Now connect to SQL server as MySQL root user, create new columns, add required
|
||||
indexes:
|
||||
|
||||
```
|
||||
$ mysql -uroot -p
|
||||
mysql> USE vmail;
|
||||
mysql> ALTER TABLE mailbox ADD COLUMN `enableindexer-worker` TINYINT(1) NOT NULL DEFAULT 1;
|
||||
mysql> ALTER TABLE mailbox ADD INDEX (`enableindexer-worker`);
|
||||
|
||||
mysql> USE amavisd;
|
||||
mysql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
|
||||
mysql> CREATE INDEX msgs_idx_spam_level ON msgs (spam_level);
|
||||
```
|
||||
|
||||
## PostgreSQL backend special
|
||||
|
||||
### Fix improper SQL query command in domain transport query file
|
||||
|
||||
Please open file `/etc/postfix/pgsql/transport_maps_domain.cf` (on Linux/OpenBSD)
|
||||
or `/usr/local/etc/postfix/pgsql/transport_maps_domain.cf` (on FreeBSD), add
|
||||
addition SQL statement `AND backupmx=0` in `query =` parameter:
|
||||
|
||||
```
|
||||
# Part of file: /etc/postfix/pgsql/transport_maps_domain.cf
|
||||
|
||||
# OLD setting
|
||||
#query = SELECT transport FROM domain WHERE domain='%s' AND active=1
|
||||
|
||||
# NEW setting
|
||||
query = SELECT transport FROM domain WHERE domain='%s' AND active=1 AND backupmx=0
|
||||
```
|
||||
|
||||
Restarting Postfix service is required.
|
||||
|
||||
### Add and remove SQL columns in `vmail` and `amavisd` databases
|
||||
|
||||
* We need new SQL columns in `vmail` database: `mailbox.enableindexer-worker`,
|
||||
it's used by Dovecot.
|
||||
|
||||
* We need new indexes for some 2 columns in `amavisd` database:
|
||||
`policy.policy_name`, `msgs.spam_level`. Both are used by iRedAdmin-Pro.
|
||||
|
||||
Now connect to SQL server as PostgreSQL admin user, create new columns, add
|
||||
required indexes:
|
||||
|
||||
```
|
||||
# su - postgres
|
||||
$ psql -d vmail
|
||||
sql> ALTER TABLE mailbox ADD COLUMN enableindexer-worker INT2 NOT NULL DEFAULT 1;
|
||||
sql> CREATE INDEX idx_mailbox_enableindexer_worker ON mailbox (enableindexer-worker);
|
||||
|
||||
sql> \c amavisd;
|
||||
sql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
|
||||
sql> CREATE INDEX msgs_idx_spam_level ON msgs (spam_level);
|
||||
```
|
Loading…
Reference in New Issue