I use CM and Outlook (Web Access). I deleted a folder on the server using Outlook, and then tried to delete the same folder in CM, but get the error "Can't remove the folder XXXX". The funny thing is, the network log says this: [16:53:11] IMAP4< * STATUS Tasks (MESSAGES 0 UIDNEXT 1 UIDVALIDITY 70 UNSEEN 0) [16:53:11] IMAP4< 15 OK STATUS completed. [16:53:16] IMAP4> 16 UNSUBSCRIBE "Impersonal emails/XXX" [16:53:16] IMAP4< 16 OK UNSUBSCRIBE completed. [16:53:16] IMAP4> 17 DELETE "Impersonal emails/XXX" [16:53:16] IMAP4< 17 NO The requested item could not be found. ** IMAP error on ballard.amazon.com: DELETE error [16:53:16] IMAP4> 18 DELETE "Impersonal emails/XXX/" [16:53:16] IMAP4< 18 NO The requested item could not be found. ** IMAP error on ballard.amazon.com: DELETE error ** can't delete mailbox [16:53:16] IMAP4> 19 SELECT "Impersonal emails/XXX" [16:53:16] IMAP4< 19 NO "Impersonal emails/XXX" doesn't exist. ** IMAP error on ballard.amazon.com: SELECT error ** can't select folder: Impersonal emails/XXX In short, I can't delete the folder because it doesn't exist.
Apparently, if I unsubscribe from the folder first, then I can delete it.
Function imap_remove_folder_real() could be improved: If the DELETE command gets a NO response, check whether the folder exists on server side (STATUS, LIST or LSUB command, probably the first one to make it simple), and if not, just continue with cleanup on client side as if DELETE succeeded. (In reply to comment #1) > Apparently, if I unsubscribe from the folder first, then I can delete it. Could please you post the protocol log from this action too?
Apologies, but today I created a folder in CM, deleted it with OWA, and then successfully deleted it in CM. I'm pretty sure I could reproduce the error by deleting one of my other long-lived folders (created at the same time and in the same way as the problem folders), but they've got lots of mail in them and I've got them set up with tons of filtering rules. I really don't want to delete them. :-/ In short, I'm not sure how to reproduce the problem now. Is there an easy way to show every property about a folder on the imap server AND in CM? Then I could create a new folder and tweak it until it exactly matches an existing folder except for the name. Hopefully that should reproduce the problem. Thanks.