Re: [exim] ACL filtering 3 dashes in host name

Etusivu
Poista viesti
Vastaa
Lähettäjä: Drav Sloan
Päiväys:  
Vastaanottaja: Phil (Medway Hosting)
Kopio: Exim Users List
Aihe: Re: [exim] ACL filtering 3 dashes in host name
Phil (Medway Hosting) wrote:
> > How does one catch host names containing three hyphens (or dashes) ?
>
> I am not an exim expert and I manage a number of different servers, but the
> regex I use to catch generic looking hostnames and PTR, is:
>
> [0-9]{1,3}[\-\.][0-9]{1,3}[\-\.][0-9]{1,3}.*\.[a-zA-Z]{2,3}$


You can simplify that somewhat. If the last char of a range expression
is a - it is not expanded and doesn't need to be escaped.

[0-9]{1,3}[\.-][0-9]{1,3}[\.-][0-9]{1,3}.*\.[a-zA-Z]{2,3}$

Just FYI :)

Regards

D.