On 11/05/2010 01:57 AM, Vincent Lefevre wrote:
On 2010-11-05 01:38:37 +0100, Jeroen Geilman wrote:
*REGULAR EXPRESSION TABLES*
        This section describes how the table lookups  change  when
        the table is given in the form of regular expressions. For
        a description of regular expression lookup  table  syntax,
        see*regexp_table*(5)<http://www.postfix.org/regexp_table.5.html>   
or*pcre_table*(5)<http://www.postfix.org/pcre_table.5.html>.

        Each  pattern  is  a regular expression that is applied to
        the entire string being looked up. Depending on the appli-
        cation,  that  string  is  an  entire  client hostname, an
        entire client IP address, or an entire mail address. Thus,
        no  parent  domain  or  parent  network  search  is  done,
        /u...@domain/  mail addresses are not broken  up  into  their
        /user@/  and/domain/  constituent parts, nor is/user+foo/  broken
        up into/user/  and/foo/.

        Patterns are applied in the order as specified in the  ta-
        ble,  until  a  pattern  is  found that matches the search
        string.

        Actions are the same as with indexed  file  lookups,  with
        the  additional feature that parenthesized substrings from
        the pattern can be interpolated as*$1*,*$2*  and so on.


I copied the entire section detailing PCRE access matches for you,
since you seem unable to find it.
Useless answer. If you had read my message, you would have seen that
I quoted from it.

And yet you didn't understand what it says.
It bears repeating.

How many domain names look like IP addresses to you ?

If check_client_access matches against both IPs and hostnames, then your
regex table will match against both IPs and hostnames.
This is not what the documentation says:

   Depending on the application, that string is an entire client
   hostname, an entire client IP address, or an entire mail address.
                                          ^^

It is said "or", and "or" doesn't mean "both". Quite the opposite.


If you combine

Each  pattern  is  a regular expression that is applied to the entire string 
being looked up.


with
*
check_client_access /type:table <http://www.postfix.org/DATABASE_README.html>/*
   Search the specified access database for the client hostname, parent
   domains, client IP address, or networks obtained by stripping least
   significant octets. See the access(5)
   <http://www.postfix.org/access.5.html> manual page for details.

the result is as explained.

Nowhere in the entire documentation is it mentioned that a regex table will ONLY match a domain OR an IP address.

If it's not in the manual, then it's not supported.

--
J.

Reply via email to