我正在尝试在我的邮件服务器 (Rocky Linux 9.5) 上设置 SpamAssassin。只是一个基本设置!
这是选项变量/etc/sysconfig/spamassassin
:
SPAMDOPTIONS="-d -c -m5 -H --create-prefs --max-children 2 -u spamd -g spamd --socketpath=/var/lib/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0666 -s /var/log/spamd.log --debug"
--debug
临时添加
当我使用启动SpamAssassin时systemctl
,它会因随机错误而退出,并且systemd会再次重新启动它,我将截断的日志放在下面:
.
.
Fri Feb 14 19:59:03 2025 [2133] info: spamd: server successfully spawned child process, pid 2135
Fri Feb 14 19:59:03 2025 [2133] dbg: prefork: child 2135: entering state 0
Fri Feb 14 19:59:03 2025 [2133] dbg: prefork: new lowest idle kid: none
Fri Feb 14 19:59:03 2025 [2135] dbg: spamd: Privilege de-escalation from user 0 and groups 0
Fri Feb 14 19:59:03 2025 [2135] dbg: spamd: setgid ERRNO is
Fri Feb 14 19:59:03 2025 [2135] dbg: util: get_user_groups: uid is 98
Fri Feb 14 19:59:03 2025 [2133] info: spamd: server successfully spawned child process, pid 2136
Fri Feb 14 19:59:03 2025 [2133] dbg: prefork: child 2136: entering state 0
Fri Feb 14 19:59:03 2025 [2133] dbg: prefork: new lowest idle kid: none
Fri Feb 14 19:59:03 2025 [2136] dbg: spamd: Privilege de-escalation from user 0 and groups 0
Fri Feb 14 19:59:03 2025 [2136] dbg: spamd: setgid ERRNO is
Fri Feb 14 19:59:03 2025 [2136] dbg: util: get_user_groups: uid is 98
Fri Feb 14 19:59:03 2025 [2133] info: spamd: server killed by SIGTERM, shutting down
Fri Feb 14 19:59:04 2025 [2137] dbg: logger: successfully added file method
.
.
我决定使用以下命令并spamd
从cli
前台和守护进程运行,它完美地运行!
sudo -u spamd -- spamd -c -m5 -H --create-prefs --max-children 2 -u spamd -g spamd --socketpath=/var/lib/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0666 -s /var/log/spamd.log --debug
sudo
即使没有!它也能正常工作。
有人遇到过与 SpamAssassin 或任何其他服务类似的问题吗?
我找到答案了!
有点傻,但那是我的错误!我在 Systemd 处理这个问题时使用了
-d
守护进程选项,而该选项与正常操作相冲突。spamd
Systemd