Mark, would you expand on this a little, please? I am currently looking at a situation with Thunderbird. When one asks it to delete an IMAP mailbox, it tries to do so by moving it to the Trash. (I.e. using RENAME mailbox Trash/mailbox). This is a problem because some servers do not (and cannot) support a rename that has the effect of moving the mailbox within the hierarchy.As an aside, I disapprove of the practices of mailboxes under INBOX and Trash mailboxes. IMAP does not prohibit either of these practices, but these practices are associated with substantial client and user confusion.
Mailboxes under INBOX are a problem because INBOX is a special name and not a name in the mailbox hierarchy.
The INBOX token is case-independent; inbox and INBOX and iNbOx and Inbox and iNBOX are all the same thing. This is not necessarily the case with other mailbox names. Consequently, if you have a hierarchy with case dependent names (as on UNIX), it is ambiguous whether inbox.foo and INBOX.foo are the same name or a different name.
You may think "of course they are the same, there's different case semantics on the INBOX part" but there is *nothing* in the IMAP specification that supports such a position!
A Trash mailbox is an unnatural mechanism for IMAP; IMAP has completely different semantics for message and mailbox deletion. The only point to a Trash mailbox is to have the protocol implement a client graphical aspect instead of the client doing it internally.
I'm not surprised to see that someone thinks that it is reasonable to delete a mailbox by trying to rename it into Trash. This is the natural bad assumption that results from the use of a Trash mailbox and the notion of "dual-use" mailboxes.
This just bears out my long-time position that so-called "dual-use" mailboxes naturally tend to lead people towards an incorrect, Windows-filesystem view of the IMAP hierarchy. The inevitable result is non-interoperability and ultimately more harm than good.
"Dual-use" is something that the server may offer, and that may be used if offered. But, as your example shows, the attitude has become that servers must offer "dual-use", and rather than using the defined general mechanisms we have clients using their own private mechanisms that depend upon "dual-use."
Unfortunately, there seems to be little hope of convincing some people about any of the above points. This is why we have a world in which some client authors think that it is reasonable to delete a mailbox by renaming it into an inferior of Trash. At least I can say that such clients are broken by design.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
