Re: [exim] Block HELO with IPs

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Renaud Allard
Ημερομηνία:  
Προς: Luca Bertoncello
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Block HELO with IPs


Luca Bertoncello wrote:
> Heiko Schlittermann <hs@???> schrieb:
>
>> "isip" checks if the argument is an IP. "[84.79.58.33]" isn't an IP.
>
> OK! Could you suggest me a RegExp I can use to test these HELOs?
>


You can use something like this (tested and working)

        deny
        condition       = ${if
match{$sender_helo_name}{\N^\[(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][
0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\]$\N}{yes}{no}}



Just be aware that IP literals are allowed in RFC2821. Of course, 99.99%
of them are spam.. But, well, it's allowed in the RFC.