[Dovecot] Best way of dealing with Case-Sensitive Issues in Dovecot

Mario Antonio support at webjogger.net
Tue Jan 12 16:54:36 EET 2010


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


More information about the dovecot mailing list