Rspamd 的 EXIM 配置中存在未知的 ACL 条件/修饰符

Rspamd 的 EXIM 配置中存在未知的 ACL 条件/修饰符

我正在尝试配置 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

答案1

将指令放置spamd_address = 127.0.0.1 11333 variant=rspamd在 ACL 部分之外。通常,它应该放置在配置的开头,在定义 ACL、服务、路由器和传输之前。

相关内容