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

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Drav Sloan
日付:  
To: Phil (Medway Hosting)
CC: Exim Users List
題目: 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.