On Sun, Feb 02, 2014 at 04:34:53PM -0800, Ray wrote:

> In this thread someone mentions that the regexp is recursive but I can't
> find this in the online documentation.

No, virtual alias rewriting is recursive, regardless of the underlying
map type.

    http://www.postfix.org/ADDRESS_REWRITING_README.html#virtual

        Addresses found in virtual alias maps are subjected to another
        iteration of virtual aliasing, but are not subjected to canonical
        mapping, in order to avoid loops.

    http://www.postfix.org/virtual.5.html

        The  optional  virtual(5)  alias table rewrites recipient
        addresses for all local, all virtual, and all  remote  mail
        destinations.   This is unlike  the  aliases(5) table which
        is used only for local(8) delivery.  Virtual aliasing is
        recursive,  and  is  implemented  by the Postfix cleanup(8)
        daemon before mail is queued.

> The online documentation actually states that as soon as a match is found
> the search terminates with the result.

That's the wrong layer, regular expression tables indeed do that, but
virtual expansion takes that result and processes it recursively.

> This is consistent with the postmap -q key statement.
> When I run the postmap -q <key> regexp:valias it get exactly the results I
> am looking for. However when running through postfix it doesn't work.

Again wrong layer.  Table lookup is not virtual expansion which performs
multiple table lookups.

-- 
        Viktor.

Reply via email to