eximconf: reject bounces to "neversender" addresses
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Mon, 14 Oct 2019 21:19:42 +0000 (22:19 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Mon, 14 Oct 2019 21:19:42 +0000 (22:19 +0100)
If an address never originates mail then there is no reason for it to be
receiving NDRs

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
modules/exim/templates/eximconf.erb

index 0cd231b..6b055f9 100644 (file)
@@ -700,6 +700,12 @@ check_recipient:
           condition     = ${lookup{$sender_address_local_part}lsearch{${extract{directory}{VSENDERDOMAINDATA}{${value}/neversenders}}}{true}}
          message       = no mail should ever come from <$sender_address>
 
+  deny    domains       = +virtual_domains
+          senders       = :
+          condition     = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}}
+          condition     = ${lookup{$local_part}lsearch{${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{true}}
+          message       = <$local_part@$domain> does not send mail; rejecting bogus NDR
+
   warn    condition     = ${if eq{$acl_m_prf}{localonly}}
           set acl_m_lrc = ${if eq{$acl_m_lrc}{}{$local_part@$domain}{$acl_m_lrc, $local_part@$domain}}