On 5.11.2012, at 20.58, Steffen Kaiser wrote: > http://wiki2.dovecot.org/AuthDatabase/LDAP/Userdb?highlight=(%25{ldap) > > is the only reference I found so far and the TODO file. > > If the attribute does not exist, there should be a default value, you can > specify, e.g.: %{ldap:attrName[,]:default value} . [,] the optional delimiter > from the TODO.
Where do you see "," as optional delimiter? But yeah, %{ldap:attrName:default} would be simple to do. Attached patch to do it. Let me know if it works.
ldap.diff
Description: Binary data
> Or if the attribute is missing, the rule is ignored. Hmm. What if there are two attributes and one of them exists and the other one doesn't?..