[exim] Adding a header if sender IP has no PTR record

Top Page
Delete this message
Reply to this message
Author: Konstantin Boyandin
Date:  
To: exim-users
Subject: [exim] Adding a header if sender IP has no PTR record
Hello,

The majority of spam these days comes from IPs without PTR records
(NXDOMAIN or SERVFAIL trying to resolve). I tried to insert a header
indicating whether IP is "clean" with a PTR, but looks I misunderstand
how it should work.

In ACL:

begin acl

acl_clean_helo:
   accept
     verify     = helo
     condition  = ${if 
match{$sender_helo_name}{\N(\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[
.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8})\N}{false}{true}}
     add_header = X-Sender-Probably-Clean: $condition


acl_check_sender:
   deny
     acl     = acl_clean_helo
     senders = /etc/exim/sender_reject.list


accept

...the rest of ACL and other sections...

If I understand correctly, acl_clean_helo should always be called and
X-Sender-Probably-Clean be inserted, but it doesn't happen.

--
Sincerely,

Konstantin