From: Mark Wooding Date: Wed, 14 May 2014 08:54:56 +0000 (+0100) Subject: spam.m4: No, we can't check domains in the DATA ACL. X-Git-Url: https://git.distorted.org.uk/~mdw/exim-config/commitdiff_plain/87afdfcd0186f0f455034c92257b46a015174335 spam.m4: No, we can't check domains in the DATA ACL. Whoops. We've been deferring for a while. This is quite bad. --- diff --git a/spam.m4 b/spam.m4 index 4253e88..9b7fe0d 100644 --- a/spam.m4 +++ b/spam.m4 @@ -103,18 +103,26 @@ skip_spam_check: accept hosts = +trusted accept condition = ${if eq{$acl_c_mode}{submission}} - ## If this is a virtual domain, and it says `spam-check=no', then - ## skip. - accept domains = ${if exists{CONF_sysconf_dir/domains.conf} \ - {partial0-lsearch; CONF_sysconf_dir/domains.conf} \ - {}} - !condition = DOMKV(spam-check, {${expand:$value}}{true}) + ## If all domains have disabled spam checking then don't check. + accept !condition = $acl_c_spam_check_domain ## Otherwise we should check. deny rcpt_spam: + ## If this is a virtual domain, and it says `spam-check=no', then we + ## shouldn't check spam. But we can't check domains at DATA time, so + ## instead we must track whether all recipients have disabled + ## checking. + warn !domains = ${if exists{CONF_sysconf_dir/domains.conf} \ + {partial0-lsearch; CONF_sysconf_dir/domains.conf} \ + {}} + set acl_c_spam_check_domain = true + warn !condition = $acl_c_spam_check_domain + condition = DOMKV(spam-check, {${expand:$value}}{true}) + set acl_c_spam_check_domain = true + ## See if we should do this check. accept acl = skip_spam_check