On Monday, August 04, 2008 at 20:49 CEST, Aaron Bennett <[EMAIL PROTECTED]> wrote:
> Magnus Bäck wrote: > > > Set up an alias on the following form: > > > > [EMAIL PROTECTED] [EMAIL PROTECTED],[EMAIL PROTECTED] > > > > In your LDAP map configuration this could translate to something like: > > > > query_filter = mail=%s > > result_attribute = mail, mailForwardingAddress > > Does that go in $alias_maps or $virtual_alias_maps? This particular example is meant for virtual aliases, but if you adjust it so that it expects the lookup key to be the bare username it'll work with local aliases as well. query_filter = uid=%s result_attribute = mail, mailForwardingAddress > I have three ldap maps working: > > ldap-localonly.cf > ldap-forwardonly.cf > ldap-forwardkeep.cf > > When I query them with postmap -q [EMAIL PROTECTED], I get the right > thing: > > if the user is set up just to get their local mail, I get: > [EMAIL PROTECTED] as a result from ldap-localonly.cf and nothing from > the other > if they are set to forward their mail and keep it locally, I get: > [EMAIL PROTECTED],[EMAIL PROTECTED] > if they are set to just forward and not keep it, I get: [EMAIL PROTECTED] > > however, it's not forwarding, it's just doing local delivery > > > [EMAIL PROTECTED] postfix]# postconf -n > alias_database = hash:/etc/aliases > alias_maps = hash:/etc/aliases, > proxy:ldap:/etc/postfix/ldap-forwardonly.cf, > proxy:ldap:/etc/postfix/ldap-forwardkeep.cf, > proxy:ldap:/etc/postfix/ldap-localonly.cf That's because you've set these up as local aliases, but then the lookup key is the bare username. [...] -- Magnus Bäck [EMAIL PROTECTED]