Zhang Huangbin
2008-Mar-26 07:09 UTC
[Dovecot] Howto create maildir in lower case while user login via imap/pop3?
Hi, all. I searched mail archives, but no result. I use OutLook Express on Windows XP as MUA, login username is in upper case, such as 'AAA at BBB.COM', when login via imap, dovecot create directories: /home/vmail/ |- BBB.COM/ # <- Domain name |- AAA/ # <- User name |- cur/ |- xxx Here, domain name and user name are in upper case. How can i make it create directories in lower case? # # dovecot -n # # /etc/dovecot.conf log_path: /var/log/dovecot login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_location: maildir:/%h/%d/%n/:INDEX=/%h/%d/%n/ mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 auth default: mechanisms: plain login user: vmail passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: ldap args: /etc/dovecot-ldap.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: vmail # # File: /etc/dovecot-ldap.conf # hosts = 127.0.0.1:389 ldap_version = 3 auth_bind = yes dn = cn=vmail,dc=openbsdonly,dc=org dnpass = passwd base = o=%d,o=domains,dc=openbsdonly,dc=org scope = subtree deref = never user_filter = (&(mail=%u)(objectClass=qmailUser)(accountStatus=active)) user_attrs = homeDirectory=home,mailMessageStore=maildir:mail,mailQuota=quota=maildir:storage pass_filter = (mail=%u) pass_attrs = userPassword=password user_global_uid = 2000 user_global_gid = 2000 default_pass_scheme = CRYPT -- Best Regards. Zhang Huangbin - OpenBSD 4.2 -release, i386. - RHEL 5.1 Client
Zhang Huangbin
2008-Mar-26 08:49 UTC
[Dovecot] Howto create maildir in lower case while user login viaimap/pop3?
Hi, Toms. Toms Trankalis wrote:> I have a similar problem. When mail comes to user at domain.com (in > lovercase) dovecot creates directory /vmail/domain.com/user, but if > user types login like User at domain.com, then dovecot creates dir > /vmail/domain.com/User and I wonder why dovecot accepts the login name > at all? > > In my sutiation dovecot is auth against mysql database. >I fixed this situation, and sorry for the noise :( Reference: http://wiki.dovecot.org/Variables#head-010a6461d783547686f70249e820fd6b83fd453e %L - lowercase So i set mail_location to: mail_location = maildir:/%Lh/%Ld/%Ln/:INDEX=/%Lh/%Ld/%Ln/ It works. -- Best Regards. Zhang Huangbin - OpenBSD 4.2 -release, i386. - RHEL 5.1 Client