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.And then you can use $acl_m0 in
acl_check_data
.