Mention different amavisd daemon user name in BSD systems.

This commit is contained in:
Zhang Huangbin 2019-05-21 13:11:47 +08:00
parent 6a35e113d4
commit a574a48aa6
2 changed files with 20 additions and 2 deletions

View File

@ -182,6 +182,11 @@ a shell script to call SpamAssassin to actually learn spam/ham periodly.
Create script `/etc/dovecot/sieve/scan_reported_mails.sh` with content below,
it's used to call `sa-learn` command to learn reported spam/ham emails:
!!! attention
If you're running FreeBSD or OpenBSD, please change the Amavisd daemon
user name in variable `AMAVISD_USER` below.
```
#!/usr/bin/env bash
# Author: Zhang Huangbin <zhb@iredmail.org>
@ -193,6 +198,10 @@ export PATH="/bin:/usr/bin:/usr/local/bin:$PATH"
export OWNER="vmail"
export GROUP="vmail"
# The Amavisd daemon user.
# Note: on OpenBSD, it's "_vscan". On FreeBSD, it's "vscan".
export AMAVISD_USER='amavis'
# Kernel name, in upper cases.
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
@ -203,7 +212,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 amavis'
export SA_LEARN="sa-learn -u ${AMAVISD_USER}"
# Spool directory.
# Must be owned by vmail:vmail.

View File

@ -201,6 +201,11 @@ chmod 0700 /var/vmail/sieve/report_spam.sieve \
a shell script to call SpamAssassin to actually learn spam/ham periodly.</p>
<p>Create script <code>/etc/dovecot/sieve/scan_reported_mails.sh</code> with content below,
it's used to call <code>sa-learn</code> command to learn reported spam/ham emails:</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>If you're running FreeBSD or OpenBSD, please change the Amavisd daemon
user name in variable <code>AMAVISD_USER</code> below.</p>
</div>
<pre><code>#!/usr/bin/env bash
# Author: Zhang Huangbin &lt;zhb@iredmail.org&gt;
# Purpose: Copy spam/ham to another directory and call sa-learn to learn.
@ -211,6 +216,10 @@ export PATH=&quot;/bin:/usr/bin:/usr/local/bin:$PATH&quot;
export OWNER=&quot;vmail&quot;
export GROUP=&quot;vmail&quot;
# The Amavisd daemon user.
# Note: on OpenBSD, it's &quot;_vscan&quot;. On FreeBSD, it's &quot;vscan&quot;.
export AMAVISD_USER='amavis'
# Kernel name, in upper cases.
export KERNEL_NAME=&quot;$(uname -s | tr '[a-z]' '[A-Z]')&quot;
@ -221,7 +230,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 amavis'
export SA_LEARN=&quot;sa-learn -u ${AMAVISD_USER}&quot;
# Spool directory.
# Must be owned by vmail:vmail.