我已经根据官方文档安装并配置了 razor2,包括编辑 spamassassin 文件夹中的 v310.pre 配置文件。
我成功运行了以下两个命令(均表明razor存在且运行正常):
# spamassassin -t -D < message.txt
# razor-check -d message.txt
但是,我没有在新邮件的标题中看到任何有关 Razor 的迹象。
例子:
Date: Wed, 19 Jun 2013 11:31:19 -0700
Content-Language: en-us
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative;
boundary="----=Part.164.7502.1371666679"
X-Spam-Status: No, score=6.0
X-Spam-Score: 60
X-Spam-Bar: ++++++
X-Ham-Report: Spam detection software, running on the system "svr1.domain.net", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
root\@localhost for details.
Content preview: Book an Alaskan Cruise today Browse Affordable Alaskan Cruises
Today: http://www.oursearchnews.com/10BVFYT143BJQQR13AMQ12L17HSGW17XXO12NGMTPR1427701KU2917665020.php
[...]
Content analysis details: (6.0 points, 7.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.4 RCVD_IN_BRBL_LASTEXT RBL: RCVD_IN_BRBL_LASTEXT
[173.232.8.252 listed in bb.barracudacentral.org]
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
for more information.
[URIs: oursearchnews.com]
1.7 URIBL_DBL_SPAM Contains an URL listed in the DBL blocklist
[URIs: oursearchnews.com]
1.2 URIBL_JP_SURBL Contains an URL listed in the JP SURBL blocklist
[URIs: oursearchnews.com]
0.0 SPF_FAIL SPF: sender does not match SPF record (fail)
[SPF failed: Please see http://www.openspf.net/Why?s=mfrom;id=cruisetoalaska%40oursearchnews.com;ip=173.232.8.252;r=svr1.domain.net]
0.0 HTML_MESSAGE BODY: HTML included in message
0.8 MPART_ALT_DIFF BODY: HTML and text parts are different
-0.0 BAYES_20 BODY: Bayes spam probability is 5 to 20%
[score: 0.1946]
0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
0.0 T_REMOTE_IMAGE Message contains an external image
X-Spam-Flag: NO
我的问题是我应该看到类似的东西吗4.0 RAZOR_SCORE
?
此外,我是否需要对以下设置采取任何特殊步骤:
CentOS CPanel/WHM EXIM 带有 spamassassin 和 Dovecot
谢谢您,如果需要,我很乐意提供更多信息。
答案1
要获得 Razor 支持,您需要做两件事。您必须在 Spamassassin 中启用它。在标准系统中,/etc/mail/spamassassin/v310.pre。确保取消注释此行:
loadplugin Mail::SpamAssassin::Plugin::Razor2
其次,确保已安装模块。快速检查方法是直接使用 perl。我还提供了一个我知道不存在的模块示例。如果您在尝试使用 Razor2 时看到该错误,则需要从 RepoForge 存储库安装 Razor 代理:
# perl -e 'use Mail::SpamAssassin::Plugin::Razor2'
# perl -e 'use Mail::SpamAssassin::Plugin::Razor3'
Can't locate Mail/SpamAssassin/Plugin/Razor3.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
# rpm -qa | grep Razor
perl-Razor-Agent-2.85-1.el5.rf
最后验证 spamassassin 在加载时是否确实使用了该模块:
# spamassassin -D < riz.cf 2>&1 | grep Razor
Jun 26 18:13:42.521 [303] dbg: plugin: loading Mail::SpamAssassin::Plugin::Razor2 from @INC