有人在 Ubuntu Server 18.10 上成功运行 SpamAssassin 吗?

有人在 Ubuntu Server 18.10 上成功运行 SpamAssassin 吗?

我正在尝试构建基于 Ubuntu 的电子邮件服务器,并希望在其上运行 SpamAssassin。我按照说明从存储库安装了它,但当我尝试启动 SpamAssassin 时,我收到如下错误消息:

Job for spamassassin.service failed because the control process exited with error code.

See "systemctl status spamassassin.service" and "journalctl -xe" for details.

跑步sudo systemctl status spamassassin.service给我带来以下好处:

Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Service RestartSec=100ms expired, scheduling restart.
Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Scheduled restart job, restart counter is at 5.
Feb 02 01:43:46 grace systemd[1]: Stopped Perl-based spam filter using text analysis.
Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Start request repeated too quickly.
Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Failed with result 'exit-code'.
Feb 02 01:43:46 grace systemd[1]: Failed to start Perl-based spam filter using text analysis.

我尝试过停止并启动该服务,以及简单地重新启动它,但都没有什么效果。我不明白发生了什么。

答案1

如果你正在关注本 Ars Technica 指南,那么你可能会/etc/default/spamassassin看到这样的画面:

SAHOME="/var/lib/spamassassin"
SAGLOBALCFGPATH="/etc/spamassassin"

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.
OPTIONS="-x --max-children 5 --helper-home-dir ${SAHOME} -u spamd -g spamd --siteconfigpath ${SAGLOBALCFGPATH} --socketpath=/var/spool/postfix/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0660"

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
CRON=1

SAHOME和的路径扩展SAGLOBALCFGPATH失败,因此请更改此文件以使其包含完整路径:

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.
OPTIONS="-x --max-children 5 --helper-home-dir /var/lib/spamassassin -u spamd -g spamd --siteconfigpath /etc/spamassassin --socketpath=/var/spool/postfix/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0660"

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
CRON=1

相关内容