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: [email protected] > mail: [email protected] > mail: [email protected] > mail: [email protected] > mailRoutingAddress: [email protected] > > I can send mail to [email protected] and [email protected], but > when I try to send a mail to [email protected] or > [email protected] 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 "[email protected]" > ldap:/etc/postfix/ldap-aliases.cf > [email protected] Wrong lookup key. > Another weird thing is that when I use this: > > query_filter = [email protected] > > 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:[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.
