When copying a message to a subfolder in "Public Folders" on an Exchange server, it seems to change the folder context to the destination folder.
Is there any way to turn off this behaviour?
Example:
* OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1 (blah) ready.
Expected behaviour:
s select "test"
* 1 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
* OK [UIDVALIDITY 15432] UIDVALIDITY value
s OK [READ-WRITE] SELECT completed.
c copy 1 "test/PROCESSED"
c OK [COPYUID 15433 2 2] COPY completed, 1 messages copied.
Strange behaviour:
s select "Public Folders/test"
* 6 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
* OK [UNSEEN 2] Is the first unseen message
* OK [UIDVALIDITY 101250] UIDVALIDITY value
s OK [READ-WRITE] SELECT completed.
c copy 1 "Public Folders/test/subfolder"
* 1978 EXISTS
* 1 RECENT
c OK [COPYUID 105075 1 1978] COPY completed, 1 messages copied.
Speaking at this as an Exchange admin, there are no user-visible "knobs" to tweak the behaviour you're talking about on the Exchange 2003 IMAP service. I'd be highly surprised if there were any "invisible" knobs, either. I think you're stuck with that quirky behaviour you're seeing. Microsoft doesn't give any visibility down into that level of the protocol interaction to the admin.
Ok, found the answer eventually, and it's due to the exchange server setup.
The client uses a front-end and back-end topology of 3 layers of Exchange servers each serving the level up. See this Technet article for how they do it.
IMAP requests were being served by the front-end server, which passed the request to one of it's back-end servers that actually held the Public Folders involved. Except it didn't. The back-end server passed the request on to the third layer of exchange servers. Somewhere along the chain the consistency of who was accessing what was lost.
The exchange admins are moving these public folders to a server with IMAP that will actually host them and not redirect access.
Lovely!