Mention different amavisd daemon user name in BSD systems.
This commit is contained in:
parent
6a35e113d4
commit
a574a48aa6
|
@ -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,
|
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:
|
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
|
#!/usr/bin/env bash
|
||||||
# Author: Zhang Huangbin <zhb@iredmail.org>
|
# Author: Zhang Huangbin <zhb@iredmail.org>
|
||||||
|
@ -193,6 +198,10 @@ export PATH="/bin:/usr/bin:/usr/local/bin:$PATH"
|
||||||
export OWNER="vmail"
|
export OWNER="vmail"
|
||||||
export GROUP="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.
|
# Kernel name, in upper cases.
|
||||||
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
|
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'
|
export LOG='logger -p local5.info -t scan_reported_mails'
|
||||||
|
|
||||||
# `sa-learn` command, with optional arguments.
|
# `sa-learn` command, with optional arguments.
|
||||||
export SA_LEARN='sa-learn -u amavis'
|
export SA_LEARN="sa-learn -u ${AMAVISD_USER}"
|
||||||
|
|
||||||
# Spool directory.
|
# Spool directory.
|
||||||
# Must be owned by vmail:vmail.
|
# Must be owned by vmail:vmail.
|
||||||
|
|
|
@ -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>
|
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,
|
<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>
|
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
|
<pre><code>#!/usr/bin/env bash
|
||||||
# Author: Zhang Huangbin <zhb@iredmail.org>
|
# Author: Zhang Huangbin <zhb@iredmail.org>
|
||||||
# Purpose: Copy spam/ham to another directory and call sa-learn to learn.
|
# Purpose: Copy spam/ham to another directory and call sa-learn to learn.
|
||||||
|
@ -211,6 +216,10 @@ export PATH="/bin:/usr/bin:/usr/local/bin:$PATH"
|
||||||
export OWNER="vmail"
|
export OWNER="vmail"
|
||||||
export GROUP="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.
|
# Kernel name, in upper cases.
|
||||||
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
|
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
|
||||||
|
|
||||||
|
@ -221,7 +230,7 @@ export LOCK_FILE='/tmp/scan_reported_mails.lock'
|
||||||
export LOG='logger -p local5.info -t scan_reported_mails'
|
export LOG='logger -p local5.info -t scan_reported_mails'
|
||||||
|
|
||||||
# `sa-learn` command, with optional arguments.
|
# `sa-learn` command, with optional arguments.
|
||||||
export SA_LEARN='sa-learn -u amavis'
|
export SA_LEARN="sa-learn -u ${AMAVISD_USER}"
|
||||||
|
|
||||||
# Spool directory.
|
# Spool directory.
|
||||||
# Must be owned by vmail:vmail.
|
# Must be owned by vmail:vmail.
|
||||||
|
|
Loading…
Reference in New Issue