[Dovecot] Bug report: "doveadm rename" encodes special characters wrongly in mUTF-7 (in fs)

megodin at inboxalias.com megodin at inboxalias.com
Fri Sep 20 17:42:45 EEST 2013


Hello there,

I'm pretty sure I found a bug in latest Dovecot 2.2.5.5 (EE) when playing with the doveadm command.

Naturally renaming a users mail folder should be done via "doveadm es consistent.

So when using "doveadm rename" trying to rename a folder with special characters e.g. german umlauts like "ä" it seems to create the folder wrongly in the filesystem.

Example: When I want to rename a users folder 'geschaftliches' to 'gesch&AOQ-ftliches' ("&AOQ-" is the correct mUTF-7 encoding for "ä") using the command

doveadm mailbox rename -u user 'geschaftliches' 'gesch&AOQ-ftliches'

it ends up in the filesystem renamed as "gesch&-AOQ-ftliches" which has an falsely added "-" set after the "&" and therefore the folder is also wrongly shown in Mailclients like Thunderbird or web-mail systems like Horde.
(Apparently "doveadm rename" supports only UTF-8 which shows up when trying to rename the folder with 
"doveadm mailbox rename -u user 'geschäftliches'" I get the error message "Fatal: Mailbox name not valid UTF-8: geschäftliches")

To get things worse, when renaming the mailfolder in Thunderbird to "geschäftliches" it gets correctly written in the filesystem as "gesch&AOQ-ftliches" - but afterwards it's NOT found anymore in the dovecot index, e.g. when trying 
doveadm force-resync -u user
it is not listed anymore (until back-renaming in fs to the name it was indexed before).

This problem can be reproduced. Can you please fix this? 
(Not sure if this might change - maybe add an option to support UTF-7 similar to doveadm mailbox list "-7" option)

Thanks in advance,
Megodin



My (relevant part) dovecot configuration (dovecot -n): 

mailstorage @ NFS with nfsvers=3 (NetApp)

# 2.2.5.5 (e5350245ad9b): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-279.22.1.el6.x86_64 x86_64 CentOS release 6.4 (Final) nfs
auth_cache_size = 10 M
auth_cache_ttl = 10 mins
auth_debug = yes
auth_master_user_separator = *
auth_username_format = %n
auth_verbose = yes
disable_plaintext_auth = no
listen = *
lock_method = dotlock
mail_debug = yes
mail_fsync = always
mail_gid = vmail
mail_home = /mnt/placeholder/%u
mail_location = sdbox:/mnt/placeholder/%u/mailstore
mail_plugins = " quota fts fts_lucene"
mail_privileged_group = mail
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
mmap_disable = yes
passdb {
  args = /etc/dovecot/users.blocked
  deny = yes
  driver = passwd-file
}
passdb {
  args = /etc/dovecot/passwd.masterusers
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  fts = lucene
  fts_lucene = whitespace_chars=@.
  quota = dict:User quota::file:%h/dovecot-quota
  quota_rule = *:storage=100M
  quota_rule2 = Trash:storage=+50M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=98%% quota-warning 98 %u
  sieve = /mnt/placeholder/%u/.dovecot.sieve
  sieve_dir = /mnt/placeholder/%u/sieve
  sieve_global_dir = /var/lib/dovecot/sieve/global/
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
postmaster_address = postmaster at example.com
protocols = imap pop3 sieve
service auth {
  unix_listener auth-userdb {
    group = vmail
    user = vmail
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
    user = vmail
  }
  user = vmail
}
ssl_cert = </example.pem
ssl_key = </example2.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-ldap-userdb.conf.ext
  driver = ldap
}
verbose_proctitle = yes
verbose_ssl = yes
protocol lda {
  mail_plugins = " quota fts fts_lucene sieve"
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = " quota fts fts_lucene imap_quota"
}




---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! http://email.freenet.de/basic/Informationen

_________________________________________________________________
Send and receive anonymous emails to your inbox with InboxAlias.
http://www.inboxalias.com



More information about the dovecot mailing list