我正在尝试将 EXIM 配置为使用 Rspamd 作为垃圾邮件过滤器。我正在运行 Exim 4.87 版,并使用此处apt-get
解释的方法从存储库安装 Rpsam 。然后我将Rspamd 文档中的建议配置添加到我的配置文件中:
begin acl
# configure Rspamd
# Please note the variant parameter
spamd_address = 127.0.0.1 11333 variant=rspamd # error occurs here
acl_smtp_data = acl_check_spam
acl_check_spam:
# do not scan messages submitted from our own hosts
accept hosts = +relay_from_hosts
# do not scan messages from submission port
accept condition = ${if eq{$interface_port}{587}}
# skip scanning for authenticated users
accept authenticated = *
# add spam-score and spam-report header when told by rspamd
warn spam = nobody:true
condition = ${if eq{$spam_action}{add header}}
add_header = X-Spam-Score: $spam_score ($spam_bar)
add_header = X-Spam-Report: $spam_report
# use greylisting available in rspamd v1.3+
defer message = Please try again later
condition = ${if eq{$spam_action}{soft reject}}
deny message = Message discarded as high-probability spam
condition = ${if eq{$spam_action}{reject}}
accept
当我尝试重新启动 Exim 时,我收到以下错误消息:
error in ACL: unknown ACL condition/modifier in "spamd_address = 127.0.0.1 11333 variant=rspamd"
这是指我上面发布的配置代码的第 4 行:spamd_address = 127.0.0.1 11333 variant=rspamd
. 我在官方 Exim 文档中找到了完全相同的行。所以它应该工作。之前有人在配置 Exim 以使用 Rspamd 时遇到过这个问题吗?
我正在使用 Ubuntu:
$ uname -a
Linux calais 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
将
spamd_address = 127.0.0.1 11333 variant=rspamd
指令放在 ACL 部分之外。一般来说,它应该放在配置的开头,然后再定义 ACL、服务、路由器和传输。