重启后Spamassassin对象方法定位问题

重启后Spamassassin对象方法定位问题

今天早上通过每日 cronjob 重新启动 spamassassin 后,系统日志中充斥着以下错误:

Feb  9 09:24:26 mail spamd[8766]: spamd: got connection over /var/run/spamd.socket
Feb  9 09:24:26 mail spamd[8766]: spamd: setuid to Debian-exim succeeded
Feb  9 09:24:26 mail spamd[8766]: spamd: checking message <004c01d0444a$01d5a905$d690a59f@kiffyv> for Debian-exim:106
Feb  9 09:24:26 mail spamd[8766]: rules: failed to run T_SPF_HELO_PERMERROR test, skipping:
Feb  9 09:24:26 mail spamd[8766]:  (Can't locate object method "check_for_spf_helo_permerror" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1169) line 19.
Feb  9 09:24:26 mail spamd[8766]: )
Feb  9 09:24:28 mail spamd[8766]: rules: failed to run T_SPF_TEMPERROR test, skipping:
Feb  9 09:24:28 mail spamd[8766]:  (Can't locate object method "check_for_spf_temperror" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1169) line 614.
Feb  9 09:24:28 mail spamd[8766]: )
Feb  9 09:24:28 mail spamd[8766]: rules: failed to run T_SPF_PERMERROR test, skipping:
Feb  9 09:24:28 mail spamd[8766]:  (Can't locate object method "check_for_spf_permerror" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1169) line 784.
Feb  9 09:24:28 mail spamd[8766]: )
Feb  9 09:24:28 mail spamd[8766]: rules: failed to run T_SPF_HELO_TEMPERROR test, skipping:
Feb  9 09:24:28 mail spamd[8766]:  (Can't locate object method "check_for_spf_helo_temperror" via package "Mail: [...]:SpamAssassin::PerMsgStatus" at (eval 1169) line 1129.
Feb  9 09:24:28 mail spamd[8766]: )
Feb  9 09:24:29 mail spamd[8766]: spamd: identified spam (26.6/5.0) for Debian-exim:106 in 3.1 seconds, 821 bytes.
Feb  9 09:24:29 mail spamd[8766]: spamd: result: Y 26 - AXB_XMAILER_MIMEOLE_OL_024C2,BAYES_99,BAYES_999,DOS_OE_TO_MX,NAME_EMAIL_DIFF,RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PSBL,RCV
Feb  9 09:24:30 mail spamd[8759]: prefork: child states: II

我已经检查过是否有无人值守的升级。我还通过 CPAN 检查了 Mail::SpamAssassin::PerMsgStatus 但它已经安装了。操作系统是 Ubuntu Server 12.04.5 LTS,没有待更新。我该如何解决这个错误?

答案1

转到更新目录(类似/var/lib/spamassassin/3.003002/updates_spamassassin_org)并注释掉包含T_SPF_PERMERROR或 的每一行可能会更容易T_SPF_TEMPERROR,例如:

# header T_SPF_PERMERROR         eval:check_for_spf_permerror()

等等,而不是升级或挑选上游更改。如果您使用自动更新,您可能需要手动更新,直到他们意识到问题为止(目前情况似乎还不是这样)。

答案2

在 Debian Wheezy 上,以下内容对我有用:

/etc/spamassassin/init.pre

评论 SPF 插件

# SPF - perform SPF verification.
#
#loadplugin Mail::SpamAssassin::Plugin::SPF

之后更新作业将再次正常运行。

答案3

您可以复制最新的SPF值如果您使用的是 3.4,请进入 /usr/share/perl5/Mail/SpamAssassin/Plugin 请不要忘记备份原始文件。

答案4

只需安装向后移植的spamassassin.将其添加到/etc/apt/sources.list.d/debian-wheezy-backports.list

deb http://ftp.nl.debian.org/debian/ wheezy-backports main contrib non-free
deb-src http://ftp.nl.debian.org/debian/ wheezy-backports main contrib non-free

并运行:

$ apt-get install -t wheezy-backports spamassassin 

相关内容