Currently, I have exim set up to mark spam mail, and reject spam mail with high scores, using these ACL instructions in the acl_smtp_data ACL:

  warn  condition = ${if <{$message_size}{500000}{1}{0}}
        spam = nobody
        add_header = X-Spam-Status: Yes
  deny  condition = ${if <{$message_size}{500000}{1}{0}}
        condition = ${if >{$spam_score_int}{80}{1}{0}}
        spam = nobody:true
        message = This message scored $spam_score spam points.

I’d like to be more aggressive for mails that are destined to certain addresses, e.g. all to @lists.example.com, and deny all spam mails to such addresses. Unfortunately, the domain acl condition is not available in acl_smtp_data. What is the suggested work-around for this?

(I would not mind imposing the more strict behaviour also on messages with multiple recipients, where at least one of them is a lists address.)


You can set an ACL variable in acl_check_rcpt, e.g.

    set acl_m0 = ${domain}
    logwrite = recipient domain = ${domain}

And then you can use $acl_m0 in acl_check_data.

  • Good idea. But with your code, acl_m0 would contain the domain of the last recipient. But I guess I could set a variable to 1 if the domain matches in acl_check_rcpt, and check the value of that variable in acl_check_data. – Joachim Breitner Jul 15 '15 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.