LDAP default value variable interpolation

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Tue Jun 30 09:04:41 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 29 Jun 2015, Leon Kyneur wrote:

> I have a configuration that works something like this on my front end proxy:
>
> pass_attrs = mail=user,\
>  =nopassword=y,\
>  =proxy=y,\
>  =host=mail.%d
>
> The above works perfectly well even though it seems a bit hack.
>
> I want to fetch the host field from LDAP and default it to "mail.%d" if the
> attribute isn't populated for the user.
>
> I have tried the following :
>
> pass_attrs = mail=user,\
>  =nopassword=y,\
>  =proxy=y,\
>  =host=%{ldap:mailHost:mail.%d}
>
> however the interpolation doesn't occur on the default. Just wondering if
> there is a way to achieve this?

according http://wiki2.dovecot.org/PasswordDatabase

you can use

  default_fields =

for passdb, too. Maybe,

  default_fields = host=mail.%d

works?

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBVZJbqXz1H7kL/d9rAQKIUwf+MTvxLBMgC2f2KrPjPdvBITHP2i61RhRo
apXyz/EPym29RKOOjriWSyxZYrRguD+Umui/QwRmGNvdzdLiasEVJTzoKFQcBIM6
mUK8D1VxtVvM3xl41FqYaxs7jGwTzraIQnxSV1bBJHUU2udUb1Kc+tWNVYjYsDJh
lukrYGMHSmcCT8ORxiTOuTY1bHzjyczw4mhHONUrVA2x+yufRfzF4U1wc0eJD7aS
Mz08M+ONodGFKk1xMg0GFRHezvWYznPa+p9O2i/vtFUM1eEUtfzHJ5MjfBEyxALh
a3dQFpk0U5UPmODlE34QSR1dP04nWZWXFtWywqQse3Qo3LjQKKaq7A==
=XTO5
-----END PGP SIGNATURE-----


More information about the dovecot mailing list