ldap attribute modifiers. how to lowercase non ASCII
hi all,
I encountered some problem with lowercasing chars like an "Ä"
with user_attrs like this:
user_attrs = uid=home=/mail/%Lu, =myvar=%L{ldap:uid}
the Ä doesnt get lower cased in both cases
# doveadm user BLÄTULA field value user blÄtula uid vmail gid vmail home /mail/blÄtula mail maildir:~/Maildir:LAYOUT=fs:INBOX=~/Maildir/INBOX myvar blÄtula
somebody knows if there a fix for that?
Greetz Matze
update of investigation...
I encountered a different behavior in %Lu and %L{ldap:uid} when doing the search with lower cased user.
# doveadm user blätula
field value uid vmail gid vmail home /var/data/vmail/private/blätula mail maildir:~/Maildir:LAYOUT=fs:INBOX=~/Maildir/INBOX spuser private/blÄtula
so in this case. the name gets lowered in the %Lu but not the %L{ldap:uid} case.
- The user in ldap is all upper case.
- system locale is en_US.UTF-8
log of the above doveadm query:
mail.debug: Jul 29 12:45:28 dovecot: auth: Debug: master in: USER 1 blätula service=doveadm mail.debug: Jul 29 12:45:28 dovecot: auth: Debug: ldap(blätula): userdb cache miss mail.debug: Jul 29 12:45:28 dovecot: auth: Debug: ldap(blätula): user search: base=ou=users, dc=uma,dc=local scope=subtree filter=(&(objectClass=inetOrgPerson)(uid=blätula)) fields=uid,uid mail.debug: Jul 29 12:45:28 dovecot: auth: Debug: ldap(blätula): result: uid=BLÄTULA; uid unused mail.debug: Jul 29 12:45:28 dovecot: auth: Debug: ldap(blätula): result: uid=BLÄTULA mail.debug: Jul 29 12:45:28 dovecot: auth: Debug: userdb out: USER 1 blätula home=/var/data/vmail/private/blätulaspuser=private/blÄtula
On 07/28/2015 05:15 PM, matthias lay wrote:
hi all,
I encountered some problem with lowercasing chars like an "Ä"
with user_attrs like this:
user_attrs = uid=home=/mail/%Lu, =myvar=%L{ldap:uid}
the Ä doesnt get lower cased in both cases
# doveadm user BLÄTULA field value user blÄtula uid vmail gid vmail home /mail/blÄtula mail maildir:~/Maildir:LAYOUT=fs:INBOX=~/Maildir/INBOX myvar blÄtula
somebody knows if there a fix for that?
Greetz Matze
On 28 Jul 2015, at 18:15, matthias lay <matthias.lay@securepoint.de> wrote:
hi all,
I encountered some problem with lowercasing chars like an "Ä"
with user_attrs like this:
user_attrs = uid=home=/mail/%Lu, =myvar=%L{ldap:uid}
the Ä doesnt get lower cased in both cases
There are various different algorithms to lowercase non-ASCII characters. Dovecot even has some code to do it if libicu is compiled in. Still, I'm not planning changing %L behavior anytime soon. Non-ASCII usernames don't work especially well now and I don't even want to try to support them well right now. That would require bigger design changes.
participants (2)
-
matthias lay
-
Timo Sirainen