On 13.3.2012, at 11.10, Vincent Schut wrote:
Old Dovecot versions didn't enforce mailbox names to be valid, new ones do. I guess user had a broken IMAP client that created a mailbox with invalid name and now Dovecot refuses to do it again.
Mailbox names are in "modified UTF-7" format. "&" character needs to be translated as"&-".
Timo,
thanks for the quick follow-up. However, I'm afraid I don't really yet grasp your explanation about the utf-7 translation ("&" character needs to be translated as"&-"). To end my confusion, could you elaborate a bit on which of these interpretations is correct:
- when I want to create a folder with a "&" using a imap client, I have to type "&-"?
no.
or:
- the imap client (offlineimap in this case) should translate the "&" into "&-" on the fly (I can do that, you can give folder translation functions in offlineimap)
no.
or:
- the foldername on disk should contain "&-" instead of just "&" to denote the ampersand?
yes.
or did you mean something else altogether ("don't use folders with & in their names, they're evil")?
When user types "&", the IMAP client should translate it to "&-". Also in filesystem it should be shown as "&-" (although this will be configurable in future). On input IMAP client will of course also see it as "&-" and should translate it back to "&" before making it visible to user.
offlineimap works correctly in that it doesn't really need to do any kind of translation or validation, since it was originally IMAP client's fault for creating it and secondarily Dovecot's fault for allowing its creation. Although I guess offlineimap could have detected that this is an invalid mailbox name and translated it to something valid (this is how Dovecot v2.x's dsync works).