Ubuntu – Unknown ACL condition/modifier in in EXIM configuration for Rspamd


I am trying to configure EXIM to use Rspamd as a spam filter. I am running Exim version 4.87 and installed Rpsam from the repositories using apt-get as explained here. Then I added the suggested configuration from the Rspamd documentation to my config file:

begin acl

# configure Rspamd
# Please note the variant parameter
spamd_address = 11333 variant=rspamd   # error occurs here

acl_smtp_data = 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}}


When I try to restart Exim I get the following error message:

error in ACL: unknown ACL condition/modifier in "spamd_address = 11333 variant=rspamd"

Which refers to the 4th line of the config code I posted above: spamd_address = 11333 variant=rspamd. I found the exact same line in the official Exim documentation. So it should work. Did anyone encounter that problem before, when configuring Exim to use Rspamd?

I am using 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

Best Answer

Place spamd_address = 11333 variant=rspamd directive outside the ACL section. In general it should be placed at the beginning of config before ACLs, services, routers and transports are defined.

Related Topic