Mario Antonio
2010-Jan-12 14:54 UTC
[Dovecot] Best way of dealing with Case-Sensitive Issues in Dovecot
In order to deal with case-sensitive issues, I am thinking to use the variable %L (adding it to my current configs --as suggested before by other users in this list) in the configuration files in this way: In Dovecot.conf: mail_location = maildir:/vmail/%Ld/%Ln/Maildir:INDEX=/indexes/%Ld/%Ln auth default: username_format: %Lu passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=5000 gid=5000 home=/vmail/%Ld/%Ln allow_all_users=yes In dovecot-sql.conf: password_query = select concat(virtual_users.user, '@', virtual_domains.name) AS user, virtual_users.password as password \ from virtual_users LEFT JOIN virtual_domains ON virtual_users.domain_id=virtual_domains.id \ where virtual_users.user='%Ln' and virtual_domains.name='%Ld' and virtual_users.status = 1 and virtual_domains.status = 1; user_query = SELECT 5000 AS uid,5000 AS gid,'/vmail/%Ld/%Ln' as home, \ concat('*:storage= ', virtual_users.quota_kb) AS quota_rule \ from virtual_users LEFT JOIN virtual_domains ON virtual_users.domain_id=virtual_domains.id \ where virtual_users.user='%Ln' and virtual_domains.name='%Ld' Is this the correct way of assuring lowercase use all over the place? Can I use the variable %L in where sql statements? Regards, Mario Antonio
Timo Sirainen
2010-Jan-19 13:07 UTC
[Dovecot] Best way of dealing with Case-Sensitive Issues in Dovecot
On Tue, 2010-01-12 at 09:54 -0500, Mario Antonio wrote:> In order to deal with case-sensitive issues, I am thinking to use the > variable %L (adding it to my current configs --as suggested before by > other users in this list) in the configuration files in this way: > > auth default: > username_format: %LuThis setting is enough actually. It permanently converts the username to lowercase. There's no need to do it anywhere else.> Can I use the variable %L in where sql statements?Yes. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20100119/3027e85c/attachment-0002.bin>