[Dovecot] LDAP + mail_location: Get "%d" from customfield
Timo Sirainen
tss at iki.fi
Mon Aug 2 17:37:48 EEST 2010
On Mon, 2010-08-02 at 15:08 +0200, Denny Schierz wrote:
> hosts = ldap.subdomain.domain.foo
> auth_bind = yes
> auth_bind_userdn = uid=%u,cn=accounts,dc=mail,dc=subdomain,dc=foo,dc=bla
If you remove the auth_bind_userdn, it does a lookup using pass_filter
and pass_attrs.
> pass_attrs = postalAddress=domain, uid=user, userPassword=password
> pass_filter = (&(objectClass=posixAccount)(uid=%n))
And when such lookup is done, it reads the domain, and changes the
username to user at postalAddress and %d expands to postalAddress then.
> If I remove user_attrs=postalAddress=domain, then I don't see anything
> in the logs, where domain is replaced.
Yes, but even though you see it in logs, it's completely ignored by
everything.. Unless you use latest v2.0 hg.
> So I repeat before getting confused :-) : Login works and I don't need
> the domainpart, with this setup. I only want to change the
> mail_location.' For me it looks like, that Dovecot has no reason to take
> a look into %d, because the username does not had one while he logged
> in.
> DoveCot has to replace %d with the content of PostalAdress, before
> home="..."
There's no simple way to currently use random userdb fields in
mail_location. Maybe some day.
More information about the dovecot
mailing list