iredmail-doc/html/upgrade.iredmail.0.9.4-0.9....

413 lines
23 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upgrade iRedMail from 0.9.4 to 0.9.5</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="/index.html" target="_blank"><img alt="iRedMail web site" src="images/logo-iredmail.png" style="vertical-align: middle; height: 30px;"/> <span>iRedMail</span></a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="upgrade-iredmail-from-094-to-095">Upgrade iRedMail from 0.9.4 to 0.9.5</h1>
<div class="toc">
<ul>
<li><a href="#upgrade-iredmail-from-094-to-095">Upgrade iRedMail from 0.9.4 to 0.9.5</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-190">Upgrade iRedAPD (Postfix policy server) to the latest 1.9.0</a></li>
<li><a href="#rhelcentos-fixed-not-enable-cron-job-to-update-spamassassin-rules">[RHEL/CentOS] Fixed: Not enable cron job to update SpamAssassin rules</a></li>
<li><a href="#rhelcentos-fixed-not-create-required-directory-used-to-store-php-session-files">[RHEL/CentOS] Fixed: Not create required directory used to store PHP session files</a></li>
<li><a href="#nginx-fixed-not-explicitly-define-content-type-texthtml-header-for-iredadmin">[Nginx] Fixed: not explicitly define Content-Type: text/html header for iRedAdmin</a></li>
<li><a href="#fixed-not-add-alias-for-virusalert-on-non-debianubuntu-oses">Fixed: not add alias for virusalert on non-Debian/Ubuntu OSes</a></li>
</ul>
</li>
<li><a href="#openldap-backend-special">OpenLDAP backend special</a><ul>
<li><a href="#new-support-postfix-sender_dependent_relayhost_maps">NEW: Support Postfix sender_dependent_relayhost_maps</a><ul>
<li><a href="#summary">Summary</a></li>
<li><a href="#use-the-latest-iredmail-ldap-schema-file">Use the latest iRedMail LDAP schema file</a></li>
<li><a href="#create-ldap-lookup-files">Create LDAP lookup files</a></li>
<li><a href="#update-postfix-settings-in-etcpostfixmaincf">Update Postfix settings in /etc/postfix/main.cf</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#mysqlmariadb-backend-special">MySQL/MariaDB backend special</a><ul>
<li><a href="#new-support-postfix-sender_dependent_relayhost_maps_1">NEW: Support Postfix sender_dependent_relayhost_maps</a><ul>
<li><a href="#summary_1">Summary</a></li>
<li><a href="#create-sql-table-vmailsender_relayhost">Create SQL table vmail.sender_relayhost</a></li>
<li><a href="#create-sql-lookup-file-sender_dependent_relayhost_mapscf">Create SQL lookup file: sender_dependent_relayhost_maps.cf</a></li>
<li><a href="#update-postfix-settings-in-etcpostfixmaincf_1">Update Postfix settings in /etc/postfix/main.cf</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#postgresql-backend-special">PostgreSQL backend special</a><ul>
<li><a href="#new-support-postfix-sender_dependent_relayhost_maps_2">NEW: Support Postfix sender_dependent_relayhost_maps</a><ul>
<li><a href="#summary_2">Summary</a></li>
<li><a href="#create-sql-table-vmailsender_relayhost_1">Create SQL table vmail.sender_relayhost</a></li>
<li><a href="#create-sql-lookup-file-sender_dependent_relayhost_mapscf_1">Create SQL lookup file: sender_dependent_relayhost_maps.cf</a></li>
<li><a href="#update-postfix-settings-in-etcpostfixmaincf_2">Update Postfix settings in /etc/postfix/main.cf</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<h2 id="changelog">ChangeLog</h2>
<blockquote>
<p>We offer remote upgrade service, check <a href="../support.html">the price</a> and <a href="../contact.html">contact us</a>.</p>
</blockquote>
<ul>
<li>2016-03-15: [Nginx] Fixed: not explicitly define <code>Content-Type: text/html</code> header for iRedAdmin</li>
<li>2016-03-08: [NEW] Supports Postfix <code>sender_dependent_relayhost_maps</code>.</li>
<li>2016-02-25:<ul>
<li>[RHEL/CentOS] Fixed: Not create required directory used to store PHP session files</li>
<li>[RHEL/CentOS] Fixed: Not enable cron job to update SpamAssassin rules</li>
<li>Fixed: not add alias for <code>virusalert</code> on non-Debian/Ubuntu OSes</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-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># File: /etc/iredmail-release
0.9.5
</code></pre>
<h3 id="upgrade-iredapd-postfix-policy-server-to-the-latest-190">Upgrade iRedAPD (Postfix policy server) to the latest 1.9.0</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>
<p>Detailed release notes are available <a href="./iredapd.releases.html">here</a>.</p>
<h3 id="rhelcentos-fixed-not-enable-cron-job-to-update-spamassassin-rules">[RHEL/CentOS] Fixed: Not enable cron job to update SpamAssassin rules</h3>
<p>Note: this is applicable to only RHEL and CentOS.</p>
<p>In iRedMail-0.9.4 and earlier releases, iRedMail didn't enable cron job to
update SpamAssassin rules. Please run commands below to fix it.</p>
<pre><code class="shell">perl -pi -e 's/^(SAUPDATE=yes)/#${1}/' /etc/sysconfig/sa-update
echo 'SAUPDATE=yes' &gt;&gt; /etc/sysconfig/sa-update
</code></pre>
<h3 id="rhelcentos-fixed-not-create-required-directory-used-to-store-php-session-files">[RHEL/CentOS] Fixed: Not create required directory used to store PHP session files</h3>
<p>Note: this is applicable to only RHEL and CentOS if you're <strong>running Nginx + php-fpm</strong>.</p>
<p>In iRedMail-0.9.4 and earlier releases, iRedMail didn't create directory used
to store PHP session files, it will cause error when your PHP application tries
to create session file. Please fix it with commands below:</p>
<pre><code class="shell">mkdir /var/lib/php/session
chown root:root /var/lib/php/session
chmod 0773 /var/lib/php/session
chmod o+t /var/lib/php/session
</code></pre>
<h3 id="nginx-fixed-not-explicitly-define-content-type-texthtml-header-for-iredadmin">[Nginx] Fixed: not explicitly define <code>Content-Type: text/html</code> header for iRedAdmin</h3>
<p>We didn't add explicit <code>Content-Type</code> header for iRedAdmin pages, this will
cause error (web pages inaccessible) if you have setting
<code>add_header X-Content-Type-Options nosniff;</code> in Nginx.</p>
<p>To prevent this issue, please add setting <code>add_header Content-Type 'text/html';</code>
in Nginx config file to explicitly define the content type, in
<code>location ~ ^/iredadmin(.*) {}</code> block:</p>
<ul>
<li>On Linux/OpenBSD, it's <code>/etc/nginx/templates/iredadmin.tmpl</code> (iRedMail-0.9.3
or newer releases) or <code>/etc/nginx/conf.d/default.conf</code>.</li>
<li>On FreeBSD, it's <code>/usr/local/etc/nginx/templates/iredadmin.tmpl</code>
(iRedMail-0.9.3 or newer releases) or <code>/usr/local/etc/nginx/conf.d/default.conf</code>.</li>
</ul>
<pre><code># Python scripts
location ~ ^/iredadmin(.*) {
add_header Content-Type 'text/html'; # &lt;-- Add this line
...
}
</code></pre>
<p>Reloading or restarting Nginx service is required.</p>
<h3 id="fixed-not-add-alias-for-virusalert-on-non-debianubuntu-oses">Fixed: not add alias for <code>virusalert</code> on non-Debian/Ubuntu OSes</h3>
<p>Note: this is <strong>NOT</strong> applicable to Debian and Ubuntu.</p>
<p>There's a bug in iRedMail-0.9.4, it adds alias <code>virusalert</code> on only Debian and
Ubuntu, but not other OSes. Please fix it with below commands:</p>
<ul>
<li>For Linux and OpenBSD:</li>
</ul>
<pre><code class="shell">perl -pi -e 's/(virusalert:.*)/#${1}/g' /etc/postfix/aliases
echo -e '\nvirusalert: root' &gt;&gt; /etc/postfix/aliases
postalias /etc/postfix/aliases
</code></pre>
<ul>
<li>For FreeBSD:</li>
</ul>
<pre><code class="shell">perl -pi -e 's/(virusalert:.*)/#${1}/g' /usr/local/etc/postfix/aliases
echo -e '\nvirusalert: root' &gt;&gt; /usr/local/etc/postfix/aliases
postalias /usr/local/etc/postfix/aliases
</code></pre>
<h2 id="openldap-backend-special">OpenLDAP backend special</h2>
<h3 id="new-support-postfix-sender_dependent_relayhost_maps">NEW: Support Postfix <code>sender_dependent_relayhost_maps</code></h3>
<h4 id="summary">Summary</h4>
<p>Postfix setting <code>relayhost</code> allows Postfix to relay outbound emails to
specified mail server instead of connecting recipient server directly. Sender
dependent relayhost (controlled by parameter <code>sender_dependent_relayhost_maps</code>)
allows you to define per-user or per-domain relayhost, it
overrides the global <code>relayhost</code> parameter setting. Specified query tables are
searched by the envelope sender address (<code>user@domain.com</code>) and domain name
(<code>@domain.com</code>). For more details, please read Postfix document:</p>
<ul>
<li>Postfix parameter: <a href="http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps"><code>sender_dependent_relayhost_maps</code></a></li>
<li>Postfix manual page: <a href="http://www.postfix.org/transport.5.html">transport(5)</a></li>
</ul>
<p>To support <code>sender_dependent_relayhost_maps</code>, we need some modification on
iRedMail server:</p>
<ul>
<li>one updated iRedMail OpenLDAP schema file with new attribute: <code>senderRelayHost</code></li>
<li>two new LDAP lookup files:<ul>
<li><code>/etc/postfix/ldap/sender_dependent_relayhost_maps_domain.cf</code></li>
<li><code>/etc/postfix/ldap/sender_dependent_relayhost_maps_user.cf</code></li>
</ul>
</li>
<li>one new Postfix parameter: <code>sender_dependent_relayhost_maps</code></li>
</ul>
<h4 id="use-the-latest-iredmail-ldap-schema-file">Use the latest iRedMail LDAP schema file</h4>
<ul>
<li>On RHEL/CentOS, 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 # Use '/etc/rc.d/slapd restart' on OpenBSD
</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/
service slapd restart
</code></pre>
<h4 id="create-ldap-lookup-files">Create LDAP lookup files</h4>
<ul>
<li>On Linux/OpenBSD:</li>
</ul>
<pre><code>cd /etc/postfix/ldap/
cp -p transport_maps_domain.cf sender_dependent_relayhost_maps_domain.cf
cp -p transport_maps_user.cf sender_dependent_relayhost_maps_user.cf
perl -pi -e 's#%s#%d#g' sender_dependent_relayhost_maps_domain.cf
perl -pi -e 's#mtaTransport#senderRelayHost#g' sender_dependent_relayhost_maps*.cf
</code></pre>
<ul>
<li>On FreeBSD:</li>
</ul>
<pre><code>cd /usr/local/etc/postfix/ldap/
cp -p transport_maps_domain.cf sender_dependent_relayhost_maps_domain.cf
cp -p transport_maps_user.cf sender_dependent_relayhost_maps_user.cf
perl -pi -e 's#%s#%d#g' sender_dependent_relayhost_maps_domain.cf
perl -pi -e 's#mtaTransport#senderRelayHost#g' sender_dependent_relayhost_maps*.cf
</code></pre>
<h4 id="update-postfix-settings-in-etcpostfixmaincf">Update Postfix settings in <code>/etc/postfix/main.cf</code></h4>
<p>We need to update 2 parameters in Postfix config file: <code>proxy_read_maps</code>,
<code>sender_dependent_relayhost_maps</code>.</p>
<ul>
<li>On <strong>Linux/OpenBSD</strong>, please run 2 commands below to update Postfix settings:</li>
</ul>
<pre><code>postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:ldap:/etc/postfix/ldap/sender_dependent_relayhost_maps_domain.cf, proxy:ldap:/etc/postfix/ldap/sender_dependent_relayhost_maps_user.cf'
</code></pre>
<ul>
<li>On <strong>FreeBSD</strong>, please run 2 commands below to update Postfix settings:</li>
</ul>
<pre><code>postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:ldap:/usr/local/etc/postfix/ldap/sender_dependent_relayhost_maps_domain.cf, proxy:ldap:/usr/local/etc/postfix/ldap/sender_dependent_relayhost_maps_user.cf'
</code></pre>
<p>Reload or restart Postfix service is required.</p>
<h2 id="mysqlmariadb-backend-special">MySQL/MariaDB backend special</h2>
<h3 id="new-support-postfix-sender_dependent_relayhost_maps_1">NEW: Support Postfix <code>sender_dependent_relayhost_maps</code></h3>
<h4 id="summary_1">Summary</h4>
<p>Postfix setting <code>relayhost</code> allows Postfix to relay outbound emails to
specified mail server instead of connecting recipient server directly. Sender
dependent relayhost (controlled by parameter <code>sender_dependent_relayhost_maps</code>)
allows you to define per-user or per-domain relayhost, it
overrides the global <code>relayhost</code> parameter setting. Specified query tables are
searched by the envelope sender address (<code>user@domain.com</code>) and domain name
(<code>@domain.com</code>). For more details, please read Postfix document:</p>
<ul>
<li>Postfix parameter: <a href="http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps"><code>sender_dependent_relayhost_maps</code></a></li>
<li>Postfix manual page: <a href="http://www.postfix.org/transport.5.html">transport(5)</a></li>
</ul>
<p>To support <code>sender_dependent_relayhost_maps</code>, we need some modification on
iRedMail server:</p>
<ul>
<li>a new SQL table: <code>vmail.sender_relayhost</code></li>
<li>a new SQL lookup file: <code>/etc/postfix/mysql/sender_dependent_relayhost_maps.cf</code></li>
<li>a new Postfix parameter: <code>sender_dependent_relayhost_maps</code></li>
</ul>
<h4 id="create-sql-table-vmailsender_relayhost">Create SQL table <code>vmail.sender_relayhost</code></h4>
<p>Please connect to MySQL server as MySQL root user, and execute SQL commands
below to create this new table:</p>
<pre><code># mysql -uroot -p
sql&gt; USE vmail;
sql&gt; CREATE TABLE IF NOT EXISTS sender_relayhost (
id BIGINT(20) UNSIGNED AUTO_INCREMENT,
account VARCHAR(255) NOT NULL DEFAULT '',
relayhost VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (id),
UNIQUE INDEX (account)
) ENGINE=InnoDB;
</code></pre>
<h4 id="create-sql-lookup-file-sender_dependent_relayhost_mapscf">Create SQL lookup file: <code>sender_dependent_relayhost_maps.cf</code></h4>
<p>Create sql lookup file by copying an existing file:</p>
<ul>
<li>On Linux/OpenBSD:</li>
</ul>
<pre><code>cd /etc/postfix/mysql/
cp -p catchall_maps.cf sender_dependent_relayhost_maps.cf
</code></pre>
<ul>
<li>On FreeBSD:</li>
</ul>
<pre><code>cd /usr/local/etc/postfix/mysql/
cp -p catchall_maps.cf sender_dependent_relayhost_maps.cf
</code></pre>
<p>Open file <code>sender_dependent_relayhost_maps.cf</code>, <strong>REPLACE</strong> the <code>query =</code> line
by below one:</p>
<pre><code>query = SELECT relayhost FROM sender_relayhost WHERE account='%s' LIMIT 1
</code></pre>
<h4 id="update-postfix-settings-in-etcpostfixmaincf_1">Update Postfix settings in <code>/etc/postfix/main.cf</code></h4>
<p>We need to update 2 parameters in Postfix config file: <code>proxy_read_maps</code>,
<code>sender_dependent_relayhost_maps</code>.</p>
<ul>
<li>On <strong>Linux/OpenBSD</strong>, please run 2 commands below to update Postfix settings:</li>
</ul>
<pre><code>postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf'
</code></pre>
<ul>
<li>On <strong>FreeBSD</strong>, please run 2 commands below to update Postfix settings:</li>
</ul>
<pre><code>postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:mysql:/usr/local/etc/postfix/mysql/sender_dependent_relayhost_maps.cf'
</code></pre>
<p>Reload or restart Postfix service is required.</p>
<h2 id="postgresql-backend-special">PostgreSQL backend special</h2>
<h3 id="new-support-postfix-sender_dependent_relayhost_maps_2">NEW: Support Postfix <code>sender_dependent_relayhost_maps</code></h3>
<h4 id="summary_2">Summary</h4>
<p>Postfix setting <code>relayhost</code> allows Postfix to relay outbound emails to
specified mail server instead of connecting recipient server directly. Sender
dependent relayhost (controlled by parameter <code>sender_dependent_relayhost_maps</code>)
allows you to define per-user or per-domain relayhost, it
overrides the global <code>relayhost</code> parameter setting. Specified query tables are
searched by the envelope sender address (<code>user@domain.com</code>) and domain name
(<code>@domain.com</code>). For more details, please read Postfix document:</p>
<ul>
<li>Postfix parameter: <a href="http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps"><code>sender_dependent_relayhost_maps</code></a></li>
<li>Postfix manual page: <a href="http://www.postfix.org/transport.5.html">transport(5)</a></li>
</ul>
<p>To support <code>sender_dependent_relayhost_maps</code>, we need some modification on
iRedMail server:</p>
<ul>
<li>a new SQL table: <code>vmail.sender_relayhost</code></li>
<li>a new SQL lookup file: <code>/etc/postfix/mysql/sender_dependent_relayhost_maps.cf</code></li>
<li>a new Postfix parameter: <code>sender_dependent_relayhost_maps</code></li>
</ul>
<h4 id="create-sql-table-vmailsender_relayhost_1">Create SQL table <code>vmail.sender_relayhost</code></h4>
<p>Please follow steps below to create this new table:</p>
<pre><code># su - postgres
$ psql -d vmail
sql&gt; CREATE TABLE sender_relayhost (
id SERIAL PRIMARY KEY,
account VARCHAR(255) NOT NULL DEFAULT '',
relayhost VARCHAR(255) NOT NULL DEFAULT ''
);
sql&gt; CREATE INDEX idx_sender_relayhost_account ON sender_relayhost (account);
</code></pre>
<h4 id="create-sql-lookup-file-sender_dependent_relayhost_mapscf_1">Create SQL lookup file: <code>sender_dependent_relayhost_maps.cf</code></h4>
<p>Create sql lookup file by copying an existing file:</p>
<ul>
<li>On Linux/OpenBSD:</li>
</ul>
<pre><code>cd /etc/postfix/pgsql/
cp -p catchall_maps.cf sender_dependent_relayhost_maps.cf
</code></pre>
<ul>
<li>On FreeBSD:</li>
</ul>
<pre><code>cd /usr/local/etc/postfix/pgsql/
cp -p catchall_maps.cf sender_dependent_relayhost_maps.cf
</code></pre>
<p>Open file <code>sender_dependent_relayhost_maps.cf</code>, <strong>REPLACE</strong> the <code>query =</code> line
by below one:</p>
<pre><code>query = SELECT relayhost FROM sender_relayhost WHERE account='%s' LIMIT 1
</code></pre>
<h4 id="update-postfix-settings-in-etcpostfixmaincf_2">Update Postfix settings in <code>/etc/postfix/main.cf</code></h4>
<p>We need to update 2 parameters in Postfix config file: <code>proxy_read_maps</code>,
<code>sender_dependent_relayhost_maps</code>.</p>
<ul>
<li>On <strong>Linux/OpenBSD</strong>, please run 2 commands below to update Postfix settings:</li>
</ul>
<pre><code>postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:pgsql:/etc/postfix/pgsql/sender_dependent_relayhost_maps.cf'
</code></pre>
<ul>
<li>On <strong>FreeBSD</strong>, please run 2 commands below to update Postfix settings:</li>
</ul>
<pre><code>postconf -e proxy_read_maps ='$canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps'
postconf -e sender_dependent_relayhost_maps='proxy:mysql:/usr/local/etc/postfix/mysql/sender_dependent_relayhost_maps.cf'
</code></pre>
<p>Reload or restart Postfix service is required.</p><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. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
</script>
</body></html>