In an existing dovecot installation with many pre-existing folders using regional characters I would like to change m-UTF7 (.&AMk-l&AOk-ments envoy&AOk-s) foldernames to UTF8 (.Éléments envoyés).

Among other reasons my main reason is folders like the above break TAB-completion navigation in the shell for me. And the replacement names are much easier and pleasing to visually parse.

Is there an integrated mechanism in dovecot facilitating the option change? Like:

if maildirCharSetOption==UTF8 and CurrentFolder.instr('&') then

or similar?

Or is the recommended way (and only way):

  • somehow create list of affected folders
  • use some scripting, awk and/or sed to
  • generate shell batch command file with lots of mv commands
  • check script output batch file for correctness
  • shutdown dovecot, postfix,
  • rerun script to get up2date folder list and process that into mv commands
  • run resulting batch script file
  • change dovecot config to "mail_location = maildir:/var/mail/%u:UTF-8=What"
  • start dovecot&postfix again

From the documentation it is not clear, if I should use UTF-8=yes or true or 1, or just UTF-8 without =<value>.

I have a workable idea on how to accomplish the above, but was wondering, if there is a better way, or a finished script from someone who inherited a m-UTF7 installation before, and wants to share that.

I think, there could be a way to suspend dovecot delivery temporarily instead of stopping dovecot, postfix, etc. And on first glance it looks like doveadm could be leveraged for translation instead of a manual translation table.

It seems, m-UTF7 is the default. Why is that? Or, Are there reasons against using UTF-8 for folder names?


UTF-8 is key-only option, i.e.:

mail_home = /home/data/%d/%n
mail_location = maildir:~/mail:LAYOUT=fs:DIRNAME=_m_a_i_l_:UTF-8


https://doc.dovecot.org/configuration_manual/mail_location/ https://github.com/dovecot/core/blob/master/src/lib-storage/mailbox-list.c#L317

  • Hi, thanks for taking the time to answer (+1). Unfortunately, I can't test your answer, because this system was replaced already. Did the command work for you to convert an Installation? If not, can somebody else please confirms to have successfully used your settings to "convert an existing mUTF-7 dovecot installation to UTF-8", then I'll mark the answer as "Accepted Solution". Thanks :) Sep 12 '19 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.