On 03/13/2012 10:00 AM, Timo Sirainen wrote:
On 13.3.2012, at 10.46, Vincent Schut wrote:
Hi,
while migrating all mail from our old to our new server (using offlineimap, imap -> imap), I get the following error for one of my user's mailboxes:
ERROR: Folder 'Organisations.RS Env& IJRS'[local_hoekman] could not be created. Server responded: ('NO', ['Invalid mailbox name: Organisations.RS Env& IJRS'])
I suppose this is because of the ampersand in the mailbox name? Because other folder with spaces in it go just fine...
Is this a fixed thing? Why was my user able to create the folder once? And why is dovecot 1.2.15 refusing to create the folder now?
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 "&-"? 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) or:
- the foldername on disk should contain "&-" instead of just "&" to denote the ampersand?
or did you mean something else altogether ("don't use folders with & in their names, they're evil")?
Vincent.