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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil \(Medway Hosting\)
Datum:  
To: Exim Users List
Betreff: Re: [exim] ACL filtering 3 dashes in host name

----- Original Message -----
From: "Always Learning" <exim.users@???>
To: "Exim Users" <exim-users@???>
Sent: Tuesday, January 26, 2010 1:27 PM
Subject: [exim] ACL filtering 3 dashes in host name


> 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}$

It has it's faults but is also a bit more specific by looking for:

1-3 digits
followed by . or -
followed by 1-3 digits
followed by . or -
followed by 1-3 digits
followed by any number of any character
followed by a dot
followed by 2 or 3 characters a-z in caps or lower case
then end of string

My reasoning is that many generic names only have the first 3 sets of digits
of the IP and often leave off the 4th set. The regex above also looks for a
TLD of ONLY 2 or 3 digits so it cant accidentally pick up the .arpa record
from the PTR (which that particular server has a nasty habit of doing (It's
not an exim server)).

I am assuming that the regex format would be the same for Exim but someone
else may like to confirm or deny that !!

Hope it helps.

All the best

Phil