From dbf15265ab71c883f90e6c95fa5a5868596e6a7c Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 3 Feb 2022 14:46:53 -0800 Subject: [PATCH] fixed writing to log for DNSBL check --- etc/exim4/exim4.conf | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/etc/exim4/exim4.conf b/etc/exim4/exim4.conf index 7b3a3a9..4e1dc0c 100644 --- a/etc/exim4/exim4.conf +++ b/etc/exim4/exim4.conf @@ -608,17 +608,13 @@ acl_rcpt_to: condition = ${if >{$runrc}{6}{yes}{no}} log_message = Unexpected error in SPF check. spfquery returned $runrc - # check DNSbl(s) and if found add header for filtering to Junk + # check DNSBL(s) and if found add header for filtering to Junk accept -## condition = ${if and { \ -## { ! def:header_X-DNS-Whitelist: } \ -## { eq {$header_X-Whitelist-Flag:}{YES}} \ -## } {yes}{no}} - condition = ${if !eq {$header_X-Whitelist-Flag:}{YES}} - dnslists = zen.spamhaus.org - log_message = $sender_host_address is listed in $dnslist_domain ${if def:dnslist_text {($dnslist_text)}} - add_header = X-DNS-Blacklist: $sender_host_address is listed in $dnslist_domain ${if def:dnslist_text {($dnslist_text)}} - add_header = X-Junk-Flag: YES + !condition = ${if eq {$header_X-Whitelist-Flag:}{YES}} + dnslists = zen.spamhaus.org + logwrite = Warning: $sender_host_address is listed in DNSBL $dnslist_domain ${if def:dnslist_text {($dnslist_text)}} + add_header = X-DNS-Blacklist: $sender_host_address is listed in $dnslist_domain ${if def:dnslist_text {($dnslist_text)}} + add_header = X-Junk-Flag: YES # will never get here if X-Whitelist-Flag or X-Junk-Flag (gets set with X-DNS-Blacklist) or X-DNS-Whitelist headers are set above .ifdef GREYLIST_ENABLED