111 lines
5.6 KiB
HTML
111 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>Upgrade iRedMail from 1.4.0 to 1.4.1</title>
|
|
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="navigation">
|
|
<a href="https://www.iredmail.org" target="_blank">
|
|
<img alt="iRedMail web site"
|
|
src="./images/logo-iredmail.png"
|
|
style="vertical-align: middle; height: 30px;"
|
|
/>
|
|
<span>iRedMail</span>
|
|
</a>
|
|
// <a href="./index.html">Document Index</a></div><h1 id="upgrade-iredmail-from-140-to-141">Upgrade iRedMail from 1.4.0 to 1.4.1</h1>
|
|
<div class="toc">
|
|
<ul>
|
|
<li><a href="#upgrade-iredmail-from-140-to-141">Upgrade iRedMail from 1.4.0 to 1.4.1</a><ul>
|
|
<li><a href="#changelog">ChangeLog</a></li>
|
|
<li><a href="#general-all-backends-should-apply-these-changes">General (All backends should apply these changes)</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="#amavisd-add-some-useful-ban-rules">Amavisd: Add some useful ban rules</a><ul>
|
|
<li><a href="#example-how-to-use-these-ban-rules">Example: How to use these ban rules</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>THIS IS A DRAFT DOCUMENT, DO NOT APPLY IT.</p>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Paid Remote Upgrade Support</p>
|
|
<p>We offer remote upgrade support if you don't want to get your hands dirty,
|
|
check <a href="https://www.iredmail.org/support.html">the details</a> and
|
|
<a href="https://www.iredmail.org/contact.html">contact us</a>.</p>
|
|
</div>
|
|
<h2 id="changelog">ChangeLog</h2>
|
|
<ul>
|
|
<li>Jul 23, 2021: initial draft document.</li>
|
|
</ul>
|
|
<h2 id="general-all-backends-should-apply-these-changes">General (All backends should apply these changes)</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>1.4.1
|
|
</code></pre>
|
|
|
|
<h3 id="amavisd-add-some-useful-ban-rules">Amavisd: Add some useful ban rules</h3>
|
|
<p>Microsoft Office documents are banned with iRedMail default settings, but it's
|
|
common that some mailbox may need to receive such documents.</p>
|
|
<p>Here we define some ban rules to allow these Office document types, iRedMail
|
|
server admin can update per-user spam policy to allow receiving such documents.</p>
|
|
<ul>
|
|
<li>Update Amavisd config file and append these lines before the last line (<code>1;</code>):<ul>
|
|
<li>on RHEL/CentOS/Rocky Linux, it's <code>/etc/amavisd/amavisd.conf</code>.</li>
|
|
<li>on Debian/Ubuntu, it's <code>/etc/amavis/conf.d/50-user</code>.</li>
|
|
<li>on FreeBSD, it's <code>/usr/local/etc/amavisd.conf</code>.</li>
|
|
<li>on OpenBSD, it's <code>/etc/amavisd/amavisd.conf</code>.</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<pre><code># Define some useful rules.
|
|
%banned_rules = (
|
|
# Allow all Microsoft Office documents.
|
|
'ALLOW_MS_OFFICE' => new_RE([qr'.\.(doc|docx|xls|xlsx|ppt|pptx)$'i => 0]),
|
|
|
|
# Allow Microsoft Word, Excel, PowerPoint documents separately.
|
|
'ALLOW_MS_WORD' => new_RE([qr'.\.(doc|docx)$'i => 0]),
|
|
'ALLOW_MS_EXCEL' => new_RE([qr'.\.(xls|xlsx)$'i => 0]),
|
|
'ALLOW_MS_PPT' => new_RE([qr'.\.(ppt|pptx)$'i => 0]),
|
|
|
|
# Default rule.
|
|
'DEFAULT' => $banned_filename_re,
|
|
);
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Restarting Amavisd service is required.</li>
|
|
</ul>
|
|
<p>Here we defines 5 ban rules:</p>
|
|
<ul>
|
|
<li><code>ALLOW_MS_OFFICE</code>: Allow all Microsoft Office documents.</li>
|
|
<li><code>ALLOW_MS_WORD</code>: Allow Microsoft Word documents (<code>.doc</code>, <code>.docx</code>).</li>
|
|
<li><code>ALLOW_MS_EXCEL</code>: Allow Microsoft Excel documents (<code>.xls</code>, <code>.xlsx</code>).</li>
|
|
<li><code>ALLOW_MS_PPT</code>: Allow Microsoft PowerPoint documents (<code>.ppt</code>, <code>.pptx</code>).</li>
|
|
<li><code>DEFAULT</code>: use the default ban rule defined in <code>$banned_filename_re</code>.</li>
|
|
</ul>
|
|
<p>You're free to define more ban rules to fit your own needs.</p>
|
|
<div class="admonition attention">
|
|
<p class="admonition-title">Attention</p>
|
|
<h4 id="example-how-to-use-these-ban-rules">Example: How to use these ban rules</h4>
|
|
<p>If you already define per-user, per-domain, or global spam policy with
|
|
iRedAdmin-Pro or manually, you can now assign these ban rules to them.</p>
|
|
<p>For example, if you have spam policy for user <code>user@domain.com</code>, to allow
|
|
this user to accept Microsoft Word and Excel documents, you can run SQL
|
|
commands below to achieve it (Note: we use MySQL for example):</p>
|
|
<pre><code>USE amavisd;
|
|
UPDATE policy SET banned_rulenames="ALLOW_MS_WORD,ALLOW_MS_EXCEL" WHERE policy_name="user@domain.com";
|
|
</code></pre>
|
|
</div><div class="footer">
|
|
<p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
|
</div></body></html> |