canonical(5) section "TABLE SEARCH ORDER":

    "With lookups from indexed files such as DB or DBM,  or  from
    networked tables  such  as  NIS,  LDAP or SQL, patterns are tried
    in the order as listed below:"

That really does what it says: try the first query.  Try the second
query. And so on.

postconf(5) section "canonical_maps":

    "Tables will be searched in the specified order until a match
     is found.  Note: these lookups are recursive."

That really works as described. For each query, search the first
table. Try the second table. And so on.

The information is in two places, but it is not ambiguous.

Are you proposing to mix these descriptions?

        Wietse

Ond?ej Lyson?k:
[ Charset windows-1252 converted... ]
> Thank you!
> 
> The documentation seems a bit ambiguous on this topic. After reading 
> canonical(5) and the canonical_maps section of postconf(5), I think it's 
> not clear which of the processing orders, mentioned in the first email, 
> it actually uses. Would you like me to write a patch for this?
> 
> Ondra
> 
> 
> On 09/15/2016 03:46 PM, Wietse Venema wrote:
> > Ond?ej Lyson?k:
> >> Hi,
> >>
> >> I need some help configuring canonical maps.
> >>
> >> Suppose you have two lookup tables listed in canonical_maps and each of
> >> these tables uses all three pattern types (user@domain, user, @domain).
> >> Now from what I see Postfix looks for a match when rewriting addresses
> >> in the following order:
> >>
> >> Look for a match of:
> >>    - user@domain in the first table
> >>    - user@domain in the second table
> >>    - user in the first table
> >>    - user in the second table
> >>    - @domain in the first table
> >>    - @domain in the second table
> >>
> >> Is there a way to make Postfix do the lookup in the following order 
> >> instead?
> >>
> >> Look for a match of:
> >>    - user@domain in the first table
> >>    - user in the first table
> >>    - @domain in the first table
> >>    - user@domain in the second table
> >>    - user in the second table
> >>    - @domain in the second table
> >
> > That is not implemented. The code that generates partial queries
> > is separate from the code that searches lookup tables (the same
> > comes up with partial access(5) queries, or even header/body checks.
> > Asking for this to be changed will not automatically make it happen.
> >
> > In the case of LDAP/SQL queries, you can enable the domain filter
> > to avoid the domain-less queries.
> >
> >     Wietse
> >
> 

Reply via email to