iredmail-doc/html/upgrade.iredmail.1.1-1.2.html

286 lines
11 KiB
HTML
Raw Normal View History

2020-02-28 01:39:32 -06:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upgrade iRedMail from 1.1 to 1.2</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;"
/>&nbsp;
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="upgrade-iredmail-from-11-to-12">Upgrade iRedMail from 1.1 to 1.2</h1>
<div class="toc">
<ul>
<li><a href="#upgrade-iredmail-from-11-to-12">Upgrade iRedMail from 1.1 to 1.2</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>
2020-03-15 22:29:00 -06:00
<li><a href="#fixed-mail-delivery-abort-if-program-altermime-is-not-available">Fixed: mail delivery abort if program 'altermime' is not available</a></li>
2020-02-28 01:39:32 -06:00
</ul>
</li>
<li><a href="#for-openldap-backend">For OpenLDAP backend</a><ul>
<li><a href="#improved-last-login-track">Improved last login track</a></li>
2020-03-31 21:41:02 -06:00
<li><a href="#fixed-can-not-store-mail-subject-with-emoji-characters-in-amavisd-database">Fixed: can not store mail subject with emoji characters in amavisd database</a></li>
2020-02-28 01:39:32 -06:00
</ul>
</li>
<li><a href="#for-mysqlmariadb-backends">For MySQL/MariaDB backends</a><ul>
<li><a href="#improved-last-login-track_1">Improved last login track</a></li>
2020-03-31 21:41:02 -06:00
<li><a href="#fixed-can-not-store-mail-subject-with-emoji-characters-in-amavisd-database_1">Fixed: can not store mail subject with emoji characters in amavisd database</a></li>
2020-02-28 01:39:32 -06:00
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This is still a DRAFT document, do <strong>NOT</strong> 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>XXX XX, 2020: initial release.</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.2
</code></pre>
2020-03-15 22:29:00 -06:00
<h3 id="fixed-mail-delivery-abort-if-program-altermime-is-not-available">Fixed: mail delivery abort if program 'altermime' is not available</h3>
<p>The script <code>mlmmj-amime-receive</code> has a bug which may abort mail delivery if
program <code>altermime</code> is not available on the system, this update fixes it.</p>
<p>Run commands below to update file <code>/usr/bin/mlmmj-amime-receive</code> (Linux) or
<code>/usr/local/bin/mlmmj-amime-receive</code> (FreeBSD/OpenBSD):</p>
<p>On Linux:</p>
<pre><code>cd /usr/bin/
wget -O mlmmj-amime-receive https://github.com/iredmail/iRedMail/raw/1.2/samples/mlmmj/mlmmj-amime-receive
chown mlmmj:mlmmj mlmmj-amime-receive
chmod 0550 mlmmj-amime-receive
</code></pre>
<p>On FreeBSD or OpenBSD:</p>
<pre><code>cd /usr/local/bin/
wget -O mlmmj-amime-receive https://github.com/iredmail/iRedMail/raw/1.2/samples/mlmmj/mlmmj-amime-receive
chown mlmmj:mlmmj mlmmj-amime-receive
chmod 0550 mlmmj-amime-receive
</code></pre>
2020-02-28 01:39:32 -06:00
<h2 id="for-openldap-backend">For OpenLDAP backend</h2>
<h3 id="improved-last-login-track">Improved last login track</h3>
<p>In iRedMail-1.0, Dovecot is configured to store user last login time in SQL
database <code>iredadmin</code>, but it only tracks either POP3 or IMAP login. In
iRedMail-1.2, it tracks both, also track when new email was delivered via
LMTP or LDA. Please follow steps below to implement this improvement.</p>
<ul>
<li>Open file <code>/etc/dovecot/dovecot.conf</code> (Linux/OpenBSD) or
<code>/usr/local/etc/dovecot/dovecot.conf</code> (FreeBSD), find the <code>last_login_key</code>
parameter and replace it by below one:</li>
</ul>
<pre><code> last_login_key = last-login/%s/%u/%d
</code></pre>
<ul>
<li>Append service name <code>last_login</code> to the <code>mail_plugins =</code> line inside both
<code>protocol lda {}</code> and <code>protocol lmtp {}</code> blocks like below:</li>
</ul>
<pre><code>protocol lda {
mail_plugins = ... last_login
...
}
protocol lmtp {
mail_plugins = ... last_login
...
}
</code></pre>
2020-02-28 01:39:32 -06:00
<ul>
<li>Open file <code>/etc/dovecot/dovecot-last-login.conf</code> (Linux/OpenBSD) or
<code>/usr/local/etc/dovecot/dovecot-last-login.conf</code> (FreeBSD), <strong>remove</strong> existing
<code>map {}</code> block and <strong>add</strong> 4 new <code>map {}</code> blocks used to track
POP3/IMAP/LMTP/LDA services.</li>
</ul>
<pre><code>map {
pattern = shared/last-login/imap/$user/$domain
table = last_login
value_field = imap
value_type = uint
fields {
username = $user
domain = $domain
}
}
map {
pattern = shared/last-login/pop3/$user/$domain
table = last_login
value_field = pop3
value_type = uint
fields {
username = $user
domain = $domain
}
}
map {
2020-02-28 03:27:13 -06:00
pattern = shared/last-login/lda/$user/$domain
2020-02-28 01:39:32 -06:00
table = last_login
2020-02-28 03:27:13 -06:00
value_field = lda
2020-02-28 01:39:32 -06:00
value_type = uint
fields {
username = $user
domain = $domain
}
}
2020-02-28 03:27:13 -06:00
# Treat lmtp as lda
2020-02-28 01:39:32 -06:00
map {
2020-02-28 03:27:13 -06:00
pattern = shared/last-login/lmtp/$user/$domain
2020-02-28 01:39:32 -06:00
table = last_login
value_field = lda
value_type = uint
fields {
username = $user
domain = $domain
}
}
</code></pre>
<ul>
<li>Download prepared SQL file used to alter SQL tables:</li>
</ul>
<pre><code>wget -O /root/last_login.mysql https://github.com/iredmail/iRedMail/raw/1.2/update/1.2/last_login.mysql
mysql iredadmin &lt; /root/last_login.mysql
rm -f /root/last_login.mysql
</code></pre>
<ul>
<li>Restarting Dovecot service is required.</li>
</ul>
2020-03-31 21:41:02 -06:00
<h3 id="fixed-can-not-store-mail-subject-with-emoji-characters-in-amavisd-database">Fixed: can not store mail subject with emoji characters in <code>amavisd</code> database</h3>
<p>In <code>amavisd</code> database, column <code>msgs.subject</code> is defined as <code>VARCHAR(255)</code>, it
doesn't support emoji characters. Please login to MySQL/MariaDB server as <code>root</code>
user or <code>amavisd</code> user, then run SQL commands below to fix it:</p>
<pre><code>USE amavisd;
ALTER TABLE msgs MODIFY COLUMN subject VARBINARY(255) NOT NULL DEFAULT '';
</code></pre>
2020-02-28 01:39:32 -06:00
<h2 id="for-mysqlmariadb-backends">For MySQL/MariaDB backends</h2>
<h3 id="improved-last-login-track_1">Improved last login track</h3>
<p>In iRedMail-1.0, Dovecot is configured to store user last login time in SQL
database <code>iredadmin</code>, but it only tracks either POP3 or IMAP login. In
iRedMail-1.2, it tracks both, also track when new email was delivered via
LMTP or LDA. Please follow steps below to implement this improvement.</p>
<ul>
<li>Open file <code>/etc/dovecot/dovecot.conf</code> (Linux/OpenBSD) or
<code>/usr/local/etc/dovecot/dovecot.conf</code> (FreeBSD), find the <code>last_login_key</code>
parameter and replace it by below one:</li>
</ul>
<pre><code> last_login_key = last-login/%s/%u/%d
</code></pre>
<ul>
<li>Open file <code>/etc/dovecot/dovecot-last-login.conf</code> (Linux/OpenBSD) or
<code>/usr/local/etc/dovecot/dovecot-last-login.conf</code> (FreeBSD), <strong>remove</strong> existing
<code>map {}</code> block and <strong>add</strong> 4 new <code>map {}</code> blocks used to track
POP3/IMAP/LMTP/LDA services.</li>
</ul>
<pre><code>map {
pattern = shared/last-login/imap/$user/$domain
table = last_login
value_field = imap
value_type = uint
fields {
username = $user
domain = $domain
}
}
map {
pattern = shared/last-login/pop3/$user/$domain
table = last_login
value_field = pop3
value_type = uint
fields {
username = $user
domain = $domain
}
}
map {
2020-02-28 03:27:13 -06:00
pattern = shared/last-login/lda/$user/$domain
2020-02-28 01:39:32 -06:00
table = last_login
2020-02-28 03:27:13 -06:00
value_field = lda
2020-02-28 01:39:32 -06:00
value_type = uint
fields {
username = $user
domain = $domain
}
}
2020-02-28 03:27:13 -06:00
# Treat lmtp as lda
2020-02-28 01:39:32 -06:00
map {
2020-02-28 03:27:13 -06:00
pattern = shared/last-login/lmtp/$user/$domain
2020-02-28 01:39:32 -06:00
table = last_login
value_field = lda
value_type = uint
fields {
username = $user
domain = $domain
}
}
</code></pre>
<ul>
<li>Download prepared SQL file used to alter SQL tables:</li>
</ul>
<pre><code>wget -O /root/last_login.mysql https://github.com/iredmail/iRedMail/raw/1.2/update/1.2/last_login.mysql
2020-02-28 03:27:13 -06:00
mysql vmail &lt; /root/last_login.mysql
2020-02-28 01:39:32 -06:00
rm -f /root/last_login.mysql
</code></pre>
<ul>
<li>Restarting Dovecot service is required.</li>
2020-03-31 21:41:02 -06:00
</ul>
<h3 id="fixed-can-not-store-mail-subject-with-emoji-characters-in-amavisd-database_1">Fixed: can not store mail subject with emoji characters in <code>amavisd</code> database</h3>
<p>In <code>amavisd</code> database, column <code>msgs.subject</code> is defined as <code>VARCHAR(255)</code>, it
doesn't support emoji characters. Please login to MySQL/MariaDB server as <code>root</code>
user or <code>amavisd</code> user, then run SQL commands below to fix it:</p>
<pre><code>USE amavisd;
ALTER TABLE msgs MODIFY COLUMN subject VARBINARY(255) NOT NULL DEFAULT '';
</code></pre><div class="footer">
2020-02-28 01:39:32 -06:00
<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>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3293801-21"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-3293801-21');
</script>
</body></html>