@ Pawel - попробовал трюк, не работал с голубятней. Прибегнул к чтению RFC.
Правильный способ, это создать папку с трейлингом /
Вот пример (взятый непосредственно из сеанса IMAP вручную):
[root@mailer-daemon ~]# telnet localhost imap
Trying 127.0.0.1...
Connected to mailer-daemon.co (127.0.0.1).
Escape character is '^]'.
* OK Dovecot ready.
A1 LOGIN user password
A1 OK Logged in.
A1 LIST "" *
* LIST (\NoInferiors \UnMarked) "/" "Drafts"
* LIST (\NoInferiors \UnMarked) "/" "Deleted Messages"
* LIST (\NoInferiors \UnMarked) "/" "INBOX"
A1 OK List completed.
A1 CREATE test/
A1 OK Create completed.
A1 CREATE test/case
A1 OK Create completed.
A1 LIST "" test*
* LIST (\Noselect \HasChildren) "/" "test"
* LIST (\NoInferiors \UnMarked) "/" "test/case"
A1 OK List completed.
А вот RFC говорит то же самое
If the mailbox name is suffixed with the server's hierarchy
separator character (as returned from the server by a LIST
command), this is a declaration that the client intends to create
mailbox names under this name in the hierarchy. Server
implementations that do not require this declaration MUST ignore
the declaration. In any case, the name created is without the
trailing hierarchy delimiter.
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.
If a new mailbox is created with the same name as a mailbox which
was deleted, its unique identifiers MUST be greater than any
unique identifiers used in the previous incarnation of the mailbox
UNLESS the new incarnation has a different unique identifier
validity value. See the description of the UID command for more
detail.
Я думаю, что это выстрел денег:
Example: C: A003 CREATE owatagusiam/
S: A003 OK CREATE completed
C: A004 CREATE owatagusiam/blurdybloop
S: A004 OK CREATE completed
Note: The interpretation of this example depends on whether
"/" was returned as the hierarchy separator from LIST. If
"/" is the hierarchy separator, a new level of hierarchy
named "owatagusiam" with a member called "blurdybloop" is
created. Otherwise, two mailboxes at the same hierarchy
level are created.