tags:

views:

248

answers:

1

In the IMAP protocol there is a folder hierarchy character. If you try to create folder with such character in the name, mailserver will create two folders. For example, if a delimiter character is "/", then command CREATE "aaa/bbb" will create two folders aaa and bbb in folder aaa.

Is it possible to create single folder with delimiter character inside? For example, the single folder with the name aaa/bbb, without aaa and bbb in aaa folder.

+1  A: 

You may try UTF7 encoding:

CREATE "one&AC8-two"

But RFC says:

If the server's hierarchy separator character appears elsewhere in the name, the server SHOULD create any superior hierarchical names that are needed for the CREATE command to be successfully completed. In other words, an attempt to create "foo/bar/zap" on a server in which "/" is the hierarchy separator character SHOULD create foo/ and foo/bar/ if they do not already exist."

http://www.faqs.org/rfcs/rfc3501.html

Pawel Lesnikowski
Yep, escaping with UTF7 works.
Pawel Lesnikowski
Well, it looks like a hack than a feature. Could break some client applications.
Sergei Stolyarov
All clients should support UTF7 encoding, so may opinion is it should not cause problems. Have you checked if it works with your server/client?
Pawel Lesnikowski
yep, it's working for thunderbird and kmail, checked some server, also ok
Sergei Stolyarov