On Tue, Dec 16, 2008 at 02:11:57PM +0100, Durk Strooisma wrote:
> Hi all,
>
> I'm succesfully using the patterns %1, %2, etc. in my LDAP tables for
> virtual_alias_maps and virtual_mailbox_maps. However, in the table for
> virtual_mailbox_domains the patterns don't seem to be expanded.
That's right. The lookup key is not u...@domain, and a bare key is
considered to be a domain part by the LDAP table layer.
> Tested with Postfix as daemon and "postfix -q", using Postfix 2.5.5-1.1 on
> Debian 5.0 (lenny).
>
> After some fiddling around with "postfix -q" and the table it seemed that
> these patterns only get expanded if the input key is an e-mail address
> (u...@domain). If a plain domain (FQDN) is used as input key, the patterns
> won't get expanded. This is logically the case with lookups for
> virtual_mailbox_domains, I suppose.
>
> My question, is this intended behaviour? Did anyone notice this behavious as
> well?
Yes, this is documented intended behaviour. See, ldap_table(5):
%[1-9] The patterns %1, %2, ... %9 are replaced by
the corresponding most significant component
of the input key's domain. If the input key
is [email protected], then %1 is com, %2
is example and %3 is mail. If the input key
is unqualified or does not have enough
domain components to satisfy all the speci-
fied patterns, the search is suppressed and
returns no results.
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[email protected]?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.