fixed writing to log for DNSBL check

This commit is contained in:
Matthew Saunders Brown 2022-02-03 14:46:53 -08:00
parent d57821c329
commit dbf15265ab

View File

@ -608,15 +608,11 @@ 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}}
!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)}}
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