On 3/5/2011 9:32 AM, Stan Hoeppner wrote:
mouss put forth on 3/5/2011 7:20 AM:
Le 05/03/2011 00:18, Stan Hoeppner a écrit :
/^.*\.(dyn|dhcp)\.embarqhsd\.net$/ REJECT Please use ISP relay
you can simplify that:
/\.(dyn|dhcp)\.embarqhsd\.net$/ REJECT Please use ISP relay
more generally /^.* is never needed.
Does this expression correctly match a longer string when used as:
check_reverse_client_hostname_access pcre:/etc/postfix/foo.pcre
(Why would the string be longer?)
Regardless, it's not required to anchor the beginning because
it's anchored at the end.
The actual FQrDNS strings in my example network will be of the form:
fl-65-40-2-201.dyn.embarqhsd.net
tx-67-232-101-101.dhcp.embarqhsd.net
I was of the impression that a preceding wild card is required if not
using fully qualified expressions, but simply trying to match only a
substring at the back end of the line.
A wildcard anchored to the beginning (or the end) is always
useless -- think about it a minute and you'll see why.
a "better" example would be
/(\W\d+){4}\..*\.embarqhsd\.net$/ REJECT ...
"Better" in what way?
This example shows something that would be impossible to
reproduce in a hash/cdb table.
-- Noel Jones