[Dovecot] mUTF-7 vs UTF-8 in mailbox names

Timo Sirainen tss at iki.fi
Sat Nov 1 22:32:30 EET 2008

(This is about v1.2 only, v1.1 will stay as it is.)

Until today Dovecot didn't care about mailbox names. IMAP RFC requires
them to be modified-UTF-7, but Dovecot didn't try to enforce it in any

Mailbox names in Sieve scripts should be UTF-8, but currently Dovecot
doesn't translate them to mUTF-7 as it should. Cyrus also did this until
the latest release (v2.3.13).

Now that I finally today wrote code to do mUTF-7 <-> UTF-8 conversion,
Dovecot can finally do the right thing. But should there be an option to
keep things backwards compatible?

 - IMAP: CREATE command requiring the mailbox name to be valid mUTF-7 is
probably ok. Several other servers already verify that mailbox names are
valid, so I doubt there are clients left anymore that don't send mUTF-7

 - deliver -m assumes now that the mailbox name is UTF-8 and converts it
to UTF-7. Should there be a -7 parameter that changes this behavior

 - Stephan's Dovecot Sieve also needs to be changed so that the mailbox
name in fileinto commands can be UTF-8. If -7 parameter is added, it
could control this behavior too.

Also I'm wondering if in the future the mailbox names in filesystem
should be converted to UTF-8. Probably not anytime soon though..

I also added imap_utf7 binary for doing mUTF-7 <-> UTF-8 conversion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20081101/37c2df2b/attachment.bin 

More information about the dovecot mailing list