【邮件服务器配置教程Q&A】在 CentOS7上配置 Postfix+Dovecot+Cyrus-sasl+Spamassassin+ClamAV

本文将总结在安装过程中碰到的问题,并逐一记录和提供解决办法。

Q1. pyzor check or “pyzor: check failed: internal error, python traceback seen in response”
No servers available! Maybe try the ‘discover’ command
运行: # pyzor discover
downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x

运行 # spamassassin -t -D pyzor < /usr/share/doc/spamassassin-*/sample-spam.txt
Feb 23 19:49:11.237 [2629] dbg: pyzor: network tests on, attempting Pyzor
Feb 23 19:49:17.790 [2629] dbg: pyzor: pyzor is available: /bin/pyzor
Feb 23 19:49:17.791 [2629] dbg: pyzor: opening pipe: /bin/pyzor check < /tmp/.spamassassin26291bwDqEtmp
Feb 23 19:49:18.084 [2629] dbg: pyzor: [2632] finished: exit 1
Feb 23 19:49:18.084 [2629] dbg: pyzor: got response: public.pyzor.org:24441 (200, ‘OK’) 0 3

我们用 strace 检查进程号,可以看到 os.mkdir Permission denied.
查看文档,我们知道需要设置合适的 homedir ,并有合适的权限。

# mkdir /etc/mail/spamassassin/.pyzor
# chown root:postfix /etc/mail/spamassassin/.pyzor
# chmod g+w /etc/mail/spamassassin/.pyzor
去 /etc/mail/spamassassin/local.cf 添加:
pyzor_options –homedir /etc/mail/spamassassin/.pyzor

运行: # pyzor –homedir /etc/mail/spamassassin/.pyzor discover
修改下载下来的 servers 文件属性 # chmod 777 /etc/mail/spamassassin/.pyzor/servers
重启 spamassassin 服务

Q2. 怎么知道 razor2 启用了?
# spamassassin -t -D razor2 </usr/share/doc/spamassassin-*/sample-spam.txt
# razor-admin -create
# razor-admin -discover
# razor-admin -register

作者: 甬洁网络

--移动互联网&物联网技术提供商