eximconf: simplify a sender domain check by using sender_domains
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Fri, 27 Sep 2019 11:35:10 +0000 (12:35 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Fri, 27 Sep 2019 11:35:10 +0000 (12:35 +0100)
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
modules/exim/templates/eximconf.erb

index 336b9d6..9d29cff 100644 (file)
@@ -670,7 +670,7 @@ check_recipient:
          hosts         = !+debianhosts
          message       = mail from <$sender_address> not allowed externally
 
-  deny    condition     = ${if match_domain{$sender_address_domain}{+virtual_domains}}
+  deny    sender_domains= +virtual_domains
           condition     = ${if exists {${extract{directory}{VSENDERDOMAINDATA}{${value}/neversenders}}}}
           condition     = ${lookup{$sender_address_local_part}lsearch{${extract{directory}{VSENDERDOMAINDATA}{${value}/neversenders}}}{true}}
          message       = no mail should ever come from <$sender_address>