Re: [exim] Blocking Users with No Reverse DNS

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Dave Evans
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Blocking Users with No Reverse DNS
On Tue, Nov 06, 2007 at 01:27:53PM +0100, Renaud Allard wrote:
> Here is a funny regex I use:
>
>         set acl_c6      = ${lookup dnsdb{ptr=$sender_host_address}{${lc:$value}} {}}
>         condition       = ${if match {$acl_c6}{\N(^[^\.]*[0-9]\-+[0-9]|^[^\.]*[0
> -9]{5,}[^\.]|^([^\.]+\.)?[0-9][^\.]*\.[^\.]+\..+\.[a-z]|^[^\.]*[0-9]\.[^\.]*[0-9
> ]-[0-9]|^(dyn|cable|dhcp|dialup|ppp|adsl)[^\.]*[0-9])\N}{yes}{no}}


Ah, what the hell, feel free to criticise my code:

http://djce.org.uk/utils/HostnameCheck.pm.txt
http://djce.org.uk/utils/hosts-named-after-ip.txt

${perl{host_name_named_after_ip}} expands to "1" (true) or "" (false).

The .pm file is pretty generic; the hosts-named-after-ip file is my
hand-edited list of false-negatives. So far I haven't had a need for false
positives list, but YMMV. Feedback welcomed.

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey