On Wed, May 13, 2009 at 04:46:02PM +0200, Micka?l Can?vet wrote: > Hi, > > I have some trouble trying to validate mail aliases from LDAP. > > My users are defined in LDAP with the attribute 'mail' that stores each > mail alias and the attribute mailRoutingAddress that stores the real > mail address (corresponding to uid). > > for example: > dn: uid=lastname, ou=people, dc=mydomain, dc=com > mail: lastn...@mydomain.com > mail: lastn...@mydomain.eu > mail: firstname.lastn...@mydomain.com > mail: firstname.lastn...@mydomain.eu > mailRoutingAddress: lastn...@mydomain.com > > I can send mail to lastn...@mydomain.com and lastn...@mydomain.eu, but > when I try to send a mail to firstname.lastn...@mydomain.com or > firstname.lastn...@mydomain.eu my mail is bounced with the error > message: unknown user: "firstname.lastname".
The lookup key for aliases(5) with local(8) delivery is as documented just the "username" without the domain. > # postmap -q "firstname.lastn...@mydomain.eu" > ldap:/etc/postfix/ldap-aliases.cf > lastn...@mydomain.com Wrong lookup key. > Another weird thing is that when I use this: > > query_filter = mail...@mydomain.com > > instead of: > > query_filter = mail=%s > > it works (but it's ugly) even for mydomain.eu that is really weird... Not weird at all. -- 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:majord...@postfix.org?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.