Fix incorrect db path for sa-learn.

This commit is contained in:
Zhang Huangbin 2020-08-09 22:00:28 +08:00
parent c158455350
commit e9fde44fcc
4 changed files with 196 additions and 2 deletions

View File

@ -206,6 +206,7 @@ export GROUP="vmail"
# The Amavisd daemon user.
# Note: on OpenBSD, it's "_vscan". On FreeBSD, it's "vscan".
export AMAVISD_USER='amavis'
export AMAVISD_USER_HOMEDIR="$(eval echo ~${AMAVISD_USER})"
# Kernel name, in upper cases.
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
@ -217,7 +218,7 @@ export LOCK_FILE='/tmp/scan_reported_mails.lock'
export LOG='logger -p local5.info -t scan_reported_mails'
# `sa-learn` command, with optional arguments.
export SA_LEARN="sa-learn -u ${AMAVISD_USER}"
export SA_LEARN="sa-learn -u ${AMAVISD_USER} --dbpath ${AMAVISD_USER_HOMEDIR}/.spamassassin"
# Spool directory.
# Must be owned by vmail:vmail.

View File

@ -0,0 +1,83 @@
# Upgrade iRedMail from 1.3.1 to 1.3.2
[TOC]
!!! warning
THIS IS A DRAFT DOCUMENT, DO NOT APPLY IT.
!!! note "Paid Remote Upgrade Support"
We offer remote upgrade support if you don't want to get your hands dirty,
check [the details](https://www.iredmail.org/support.html) and
[contact us](https://www.iredmail.org/contact.html).
## ChangeLog
* XXX XX, 2020: initial release.
## General (All backends should apply these changes)
### Update `/etc/iredmail-release` with new 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:
```
1.3.2
```
### Upgrade iRedAPD (Postfix policy server) to the latest stable release
The recent iRedAPD-4.0 and 4.1 contain a critical bug which causes temporarily
rejection, this new release fixes it.
Please follow below tutorial to upgrade iRedAPD to the latest stable release:
[Upgrade iRedAPD to the latest stable release](./upgrade.iredapd.html)
### Upgrade Roundcube webmail to the latest stable release (1.4.7)
!!! warning "Roundcube 1.4"
Since Roundcube 1.3, at least __PHP 5.4__ is required. If your server is
running PHP 5.3 and cannot upgrade to 5.4, please upgrade Roundcube
the latest 1.2 branch instead.
Roundcube 1.4.6 fixes few security issues, 1.4.7 fixes a new one. All users are encouraged to upgrade
_as soon as possible_.
* [How to upgrade Roundcube](https://github.com/roundcube/roundcubemail/wiki/Upgrade).
References:
- 05 July 2020, [Security updates 1.4.7, 1.3.14 and 1.2.11 released](https://roundcube.net/news/2020/07/05/security-updates-1.4.7-1.3.14-and-1.2.11)
- 07 June 2020, [Updates 1.4.6 and 1.3.13 released](https://roundcube.net/news/2020/06/07/updates-1.4.6-and-1.3.13-released)
- 02 June 2020, [Security updates 1.4.5 and 1.3.12 released](https://roundcube.net/news/2020/06/02/security-updates-1.4.5-and-1.3.12)
### Upgrade netdata to the latest stable release (1.23.2)
If you have netdata installed, you can upgrade it by following this tutorial:
[Upgrade netdata](./upgrade.netdata.html).
### Fixed: update Fail2ban filter rules to match new error log produced by latest Roundcube
Please run commands below as root user to get latest filter file for Roundcube:
```
cd /etc/fail2ban/filter.d/
wget -O roundcube.iredmail.conf https://raw.githubusercontent.com/iredmail/iRedMail/1.3.1/samples/fail2ban/filter.d/roundcube.iredmail.conf
```
Restarting `fail2ban` service is required.
### Fixed: can not store mail sender address with utf8 characters in `amavisd` database
In `amavisd` database, column `msgs.from_address` is defined as `VARCHAR(255)`, it
doesn't support emoji characters. Please login to MySQL/MariaDB server as `root`
user or `amavisd` user, then run SQL commands below to fix it:
```
USE amavisd;
ALTER TABLE msgs MODIFY COLUMN from_address VARBINARY(255) NOT NULL DEFAULT '';
```

View File

@ -227,6 +227,7 @@ export GROUP="vmail"
# The Amavisd daemon user.
# Note: on OpenBSD, it's "_vscan". On FreeBSD, it's "vscan".
export AMAVISD_USER='amavis'
export AMAVISD_USER_HOMEDIR="$(eval echo ~${AMAVISD_USER})"
# Kernel name, in upper cases.
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
@ -238,7 +239,7 @@ export LOCK_FILE='/tmp/scan_reported_mails.lock'
export LOG='logger -p local5.info -t scan_reported_mails'
# `sa-learn` command, with optional arguments.
export SA_LEARN="sa-learn -u ${AMAVISD_USER}"
export SA_LEARN="sa-learn -u ${AMAVISD_USER} --dbpath ${AMAVISD_USER_HOMEDIR}/.spamassassin"
# Spool directory.
# Must be owned by vmail:vmail.

View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upgrade iRedMail from 1.3.1 to 1.3.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-131-to-132">Upgrade iRedMail from 1.3.1 to 1.3.2</h1>
<div class="toc">
<ul>
<li><a href="#upgrade-iredmail-from-131-to-132">Upgrade iRedMail from 1.3.1 to 1.3.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>
<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-roundcube-webmail-to-the-latest-stable-release-147">Upgrade Roundcube webmail to the latest stable release (1.4.7)</a></li>
<li><a href="#upgrade-netdata-to-the-latest-stable-release-1232">Upgrade netdata to the latest stable release (1.23.2)</a></li>
<li><a href="#fixed-update-fail2ban-filter-rules-to-match-new-error-log-produced-by-latest-roundcube">Fixed: update Fail2ban filter rules to match new error log produced by latest Roundcube</a></li>
<li><a href="#fixed-can-not-store-mail-sender-address-with-utf8-characters-in-amavisd-database">Fixed: can not store mail sender address with utf8 characters in amavisd database</a></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>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.3.2
</code></pre>
<h3 id="upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release">Upgrade iRedAPD (Postfix policy server) to the latest stable release</h3>
<p>The recent iRedAPD-4.0 and 4.1 contain a critical bug which causes temporarily
rejection, this new release fixes it.</p>
<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>
<h3 id="upgrade-roundcube-webmail-to-the-latest-stable-release-147">Upgrade Roundcube webmail to the latest stable release (1.4.7)</h3>
<div class="admonition warning">
<p class="admonition-title">Roundcube 1.4</p>
<p>Since Roundcube 1.3, at least <strong>PHP 5.4</strong> is required. If your server is
running PHP 5.3 and cannot upgrade to 5.4, please upgrade Roundcube
the latest 1.2 branch instead.</p>
</div>
<p>Roundcube 1.4.6 fixes few security issues, 1.4.7 fixes a new one. All users are encouraged to upgrade
<em>as soon as possible</em>.</p>
<ul>
<li><a href="https://github.com/roundcube/roundcubemail/wiki/Upgrade">How to upgrade Roundcube</a>.</li>
</ul>
<p>References:</p>
<ul>
<li>05 July 2020, <a href="https://roundcube.net/news/2020/07/05/security-updates-1.4.7-1.3.14-and-1.2.11">Security updates 1.4.7, 1.3.14 and 1.2.11 released</a></li>
<li>07 June 2020, <a href="https://roundcube.net/news/2020/06/07/updates-1.4.6-and-1.3.13-released">Updates 1.4.6 and 1.3.13 released</a></li>
<li>02 June 2020, <a href="https://roundcube.net/news/2020/06/02/security-updates-1.4.5-and-1.3.12">Security updates 1.4.5 and 1.3.12 released</a></li>
</ul>
<h3 id="upgrade-netdata-to-the-latest-stable-release-1232">Upgrade netdata to the latest stable release (1.23.2)</h3>
<p>If you have netdata installed, you can upgrade it by following this tutorial:
<a href="./upgrade.netdata.html">Upgrade netdata</a>.</p>
<h3 id="fixed-update-fail2ban-filter-rules-to-match-new-error-log-produced-by-latest-roundcube">Fixed: update Fail2ban filter rules to match new error log produced by latest Roundcube</h3>
<p>Please run commands below as root user to get latest filter file for Roundcube:</p>
<pre><code>cd /etc/fail2ban/filter.d/
wget -O roundcube.iredmail.conf https://raw.githubusercontent.com/iredmail/iRedMail/1.3.1/samples/fail2ban/filter.d/roundcube.iredmail.conf
</code></pre>
<p>Restarting <code>fail2ban</code> service is required.</p>
<h3 id="fixed-can-not-store-mail-sender-address-with-utf8-characters-in-amavisd-database">Fixed: can not store mail sender address with utf8 characters in <code>amavisd</code> database</h3>
<p>In <code>amavisd</code> database, column <code>msgs.from_address</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 from_address VARBINARY(255) NOT NULL DEFAULT '';
</code></pre><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>
<!-- 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>