Sender Verification
This is a fairly safe sender verify ACL. It only rejects the message if the sender verify specifically rejects the message during the recipient part of the verification. It also uses a specific email address rather an empty message for verification. This avoids misconfigured hosts that reject empty from addresses at the recipient phase. It also supports the use of a no verify list for really stupid hosts where testing must be avoided. The no verify list will whitelist both the senders domain and the host address.
deny message = REJECTED - Sender Verify Failed - The email server for the domain [$sender_address_domain] tells junkemailfilter.com that the sender's email address [$sender_address] is not a valid. $sender_verify_failure
log_message = REJECTED - Sender Verify Failed - The email server for the domain [$sender_address_domain] tells junkemailfilter.com that the sender's email address [$sender_address] is not a valid. $sender_verify_failure
!verify = header_sender/callout=2m,defer_ok,mailfrom=sender-verify@junkemailfilter.com
condition = ${if eq{recipient}{$sender_verify_failure}}
condition = ${lookup{$sender_address_domain}wildlsearch{/etc/exim/acllists/noverify.txt}{no}{yes}}
condition = ${lookup{$sender_host_address}wildlsearch{/etc/exim/acllists/noverify.txt}{no}{yes}}This sender verification combines a wider verify fail with failed reverse DNS. It's a combination of two sins that causes the bounce.
deny message = REJECTED - Sender Verify Failed and no RDNS - error code = $sender_verify_failure
log_message = REJECTED - Sender Verify Failed and no RDNS - error code = $sender_verify_failure
!verify = reverse_host_lookup
!verify = header_sender/callout=2m,defer_ok,mailfrom=sender-verify@junkemailfilter.com
!condition = ${if eq{$sender_verify_failure}{}}
condition = ${lookup{$sender_address_domain}wildlsearch{/etc/exim/acllists/noverify.txt}{no}{yes}}
Other Tricks
Block if Subject and Body are both Empty.
deny message = REJECTED - No Subject or Body
!condition = ${if def:h_Subject:}
condition = ${if <{$body_linecount}{1}{true}{false}}