From: Mark Wooding Date: Sun, 20 Jul 2014 13:53:18 +0000 (+0100) Subject: base.m4: New `senders' entry in `domains.conf'. X-Git-Url: https://git.distorted.org.uk/~mdw/exim-config/commitdiff_plain/5051a30f491335189038d41671b6d494c4d716e0 base.m4: New `senders' entry in `domains.conf'. This is a get-out-of-gaol card for sending domains too badly misconfigured to manage a valid DNS A or MX record. --- diff --git a/base.m4 b/base.m4 index d42d98d..579e835 100644 --- a/base.m4 +++ b/base.m4 @@ -161,11 +161,8 @@ mail: ## Always allow the empty sender, so that we can receive bounces. accept senders = : - ## Ensure that the sender is routable. This is important to prevent - ## undeliverable bounces. - require message = Invalid sender; \ - ($sender_verify_failure; $acl_verify_message) - verify = sender + ## Ensure that the sender looks valid. + require acl = mail_check_sender ## If this is directly from a client then hack on it for a while. warn condition = ${if eq{$acl_c_mode}{submission}} @@ -184,6 +181,23 @@ SECTION(acl, mail-tail)m4_dnl ## And we're done. accept +SECTION(acl, misc)m4_dnl +mail_check_sender: + + ## See whether there's a special exception for this sender domain. + accept senders = ${LOOKUP_DOMAIN($sender_address_domain, + {KV(senders, {$value}{})}, + {})} + + ## Ensure that the sender is routable. This is important to prevent + ## undeliverable bounces. + require message = Invalid sender; \ + ($sender_verify_failure; $acl_verify_message) + verify = sender + + ## We're good, then. + accept + SECTION(global, acl)m4_dnl acl_smtp_connect = connect SECTION(acl, connect)m4_dnl