I was trying to clean up my IMAP folders. For some reason I had two inbox folders, one called "INBOX" and one called "Inbox", which I was trying to merge. I must have messed up when renaming them, because when I then moved my old mails into the newly renamed mailbox, they vanished and I haven't been able to retrieve them since.

All my tries of renaming back and forth or playing around with different prefixes have been without success, and normally I'd believe to have lost them, and I would then try to salvage what's possible with my old backups.

But: My webmail interfaces (both Roundcube and Horde) still show their "Storage 29% full", so the mails must still be somewhere on the server.
And every time I open up Mail.app on my Mac, it will download those 222 mails, but they don't show up anywhere; and the next time I start the program, they are downloaded somewhere once again.

So: Is there any way to view and retrieve mails that don't seem to belong to a folder (or label?) anymore? I'm not afraid to go a bit low-level here if you can point me the right direction.

Or, alternatively: Where does Mail.app store those downloaded mails that don't show up in the GUI?

  • It's not possible in IMAP to have messages outside of folders (which are called mailboxes in the IMAP4 RFC). Would you be able to run an unencrypted session with the server, capture it with wireshark, and study the IMAP commands and responses up to when these mails seem to get fetched? – Daniel Vérité Feb 12 '17 at 13:56
  • Thank you for your answer. Okay, so they must be in some mailbox, but maybe in a mailbox I can't see? Maybe with another path prefix? Is there some way I can get a list of valid path prefixes? Wireshark was a great idea. Unfortunately I cannot get Mail.app to accept my insecure server settings. All other clients I have tried do, but Mail.app is the only one with that weird behaviour of downloading my invisible mails, so the IMAP traffic of the other clients didn't give me any new ideas. – attoPascal Feb 14 '17 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.