Len Conrad wrote:
Here's what I use to match IP-containing hostnames, should work for you.
/(\d{1,3}[-\.]){3}\d{1,3}[^.]+\.[^.]/ class_client_filter
ie. there must be a dot somewhere after the IP-containing section.
OK, same idea as mine, but I say "there must be a [ after the PTR domain name",
because without the post-PTR-domain-name anchor, it was matching/shunting all connections
into the (suspect) client_filter.class instead of staying in the non_suspect (main)
branch.
Postfix never includes the "[" in the query. To exclude IP
addresses, require "something" after the IP part, such as an
extra period or some alpha.
So what string does the restriction class matching look at?
The lookup is an access table, so man 5 access describes the
search order.
short version: postfix does two queries. First the IP
address, then the hostname.
-- Noel Jones