Unexpected variable expand behavior

Aki Tuomi aki.tuomi at open-xchange.com
Thu Dec 9 05:56:43 UTC 2021


> On 08/12/2021 22:07 Евгений Бахтин <mail at eugene.su> wrote:
> 
> 
> Hi, dear developers!
> 
> I have two passdb sections. The first one is PostgreSQL and the second one is LDAP.
> In the first passdb (SQL) I wrote ˋpassword_queryˋ with ˋ... 'uid=life,is=good' AS "dn" ...ˋ part.
> When I run ˋdoveadm auth test usernameˋ it shows correct variable value in ˋextra fields: dn=uid=life,is=goodˋ. Awesome.
> 
> In the second passdb (LDAP) I wrote ˋauth_bind_userdn = %{passdb:dn}ˋ. And here comes the problem.
> 
> Wireshark shows bindRequest as ˋuid\3Dlife\2Cis\3Dgoodˋ. This is an unexpected behavior.
> 
> Why Dovecot in LDAP request ˋ=ˋ replaces with ˋ\3Dˋ and ˋ,ˋ replaces with ˋ\2Cˋ? How can I avoid such variable expand behavior?
> 
> Best.

For safety reasons. If you can return it as life.is.good you can write auth_bind_userddn = uid=%D{passdb:dn}

See https://doc.dovecot.org/configuration_manual/config_file/config_variables/

Aki


More information about the dovecot mailing list