-2

This is the first time I post on this forum, but since I have found a few leads on my problem I am hoping that I will find a solution.

I think what I want to do is very simple.

I have a web server running exim4 and I want to limit the total amount of mail that exim can send.

I have added the following acl definitions to the main config file:

acl_check_not_smtp:

    warn ratelimit = 0 / 1h / strict / $sender_address_local_part
    log_message = Sender rate $sender_rate / $sender_rate_period

acl_not_smtp:

    deny message = Sender rate overlimit - $sender_rate / $sender_rate_period
    ratelimit = 1 / 30m / strict

    #System-wide rate limit
    defer message = Sorry, too busy right now.
    ratelimit = 10 / 1h / $primary_hostname

    accept

But as soon as I add acl_not_smtp = acl_not_smtp I get the following error:

Stopping MTA for restart:2014-11-13 22:12:47 Exim configuration error in line 433 of /var/lib/exim4/config.autogenerated.tmp: 
error in ACL: unknown ACL condition/modifier in "acl_not_smtp = acl_not_smtp"

I have read and searched but something is eluding me, your help will be greatly appreciated.

Thanks

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
  • "add acl_not_smtp = acl_not_smtp"...add to what and where and the specific statement. You have not provided the specific context to help you. – mdpc Nov 14 '14 at 03:32

1 Answers1

1

The name "acl_not_smtp" is a top level setting. You can assign a single command to it, or you can assign a differently named acl segment to it. If you don't assign anything to it, but you do have an "acl_not_smtp" acl segment in your ACLs, then Exim will still use it because it's the right name. Examples:

# Don't do any checking, just force Exim to accept:
acl_not_smtp = accept

# But here we actually declare which acl segment to use:
acl_not_smtp = acl_check_not_smtp

begin acl
acl_check_not_smtp:
  ...your ACL checks

You are mixing the two in an incompatible way.

I suspect you have in the top of your configuration acl_not_smtp = acl_check_not_smtp, but then in your ACL section, you have both an acl segment named acl_not_smtp (which you had to add because you followed some Howto) and acl_check_not_smtp. When Exim tries to figure out what to call, it interprets acl_not_smtp as having been defined twice (once in the global section saying it would be served by acl_check_not_smtp, and then defined again by its default name in the ACLs).

The solution is to merge the contents of what you added in acl_not_smtp into the acl_check_not_smtp segment and delete the acl_not_smtp section from the ACLs (assuming that added it...if it was already there, then you need to show us more of your configuration).

Todd Lyons
  • 2,006
  • 16
  • 12