[exim] Add a header when reverse DNS fails or defers?

Página Inicial
Delete this message
Reply to this message
Autor: Marc Sherman
Data:  
Para: exim-users
Assunto: [exim] Add a header when reverse DNS fails or defers?
I currently add a header to incomming mail when reverse DNS fails (this
is from the default config that ships with Debian Sarge):

   warn message = X-Broken-Reverse-DNS: no host name found for IP \
                  address $sender_host_address
        !verify = reverse_host_lookup


However, I've run into some spam sites that seem to have intentionally
set up their reverse DNS to time out, which causes that test to defer; I
end up with a log message, but no header on the email.

I'd like to add a header in the defer case as well as fail. Back in
September, Andrew from Supernews posted something similar to what I
need, in:
http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20040913/msg00223.html

> acl_callout_test:
>     warn   set acl_c0 = defer
>     accept verify = sender/callout
>            set acl_c0 = accept
>     warn   set acl_c0 = deny
>     deny

>
> acl_check_mail:
>     ...other stuff...
>     warn   acl = acl_callout_test
>     # at this point acl_c0 is set to "defer" "deny" or "accept"


I was thinking I could extend that, but I'm not sure if I'm doing it
right. Would the following solution work?

acl_reverse_host_lookup_deferfail:
   warn   set acl_c0 = deny
   accept endpass
          verify = reverse_host_lookup
          set acl_c0 = accept
   warn   set acl_c0 = defer
   deny


acl_check_rcpt:
   ...other stuff...
   warn acl = acl_reverse_host_lookup_deferfail
        message = X-Broken-Reverse-DNS: no host name found for IP \
                  address $sender_host_address ($acl_c0)


Thanks,
- Marc