How to restore just an IMAP email account's Inbox folder in TimeMachine

MacOS 12.7.1; Mail 16.0.


I accidentally deleted all email in an IMAP email account's inbox, and the changes propagated to the mail server. I found the account's most recent folder in ~/Library/Mail/V9/E3A9C34E-ADFD-463D-92C6-FC061A06XXXX (I changed the last 4 digits to X in this post, just in case (privacy)). That folder contains INBOX.mbox and that folder contains all the mail folders I created, plus Sent Messages.mbox, Sent.mbox, spam.inbox, Trash.mbox, Info.plist, plus a folder named like the alphanumeric string above, but it does not contain inbox.mbox (nor Drafts, Junk (maybe that's 'spam'), Archive).


Therefore when I try to restore in Time Machine, I don't see Inbox. Unless that 32 char string folder *is* the Inbox, I don't know how (or if) I can restore the inbox. I have restored the entire mail store prior to the deletions, to a different location, but am reluctant to restore that to the actual mail folder.


Probably irrelevant, but In Mail, when I right click the account and choose Account Info, Inbox shows with an inbox icon. Other containers have a folder icon (and Sent, Drafts, Archives, Trash, and Junk all have their own icons).


I also have a Carbon Copy Cloner backup, in case that might be a solution.





MacBook Pro 13″

Posted on Nov 27, 2023 1:58 PM

Reply

Similar questions

7 replies

Nov 27, 2023 5:45 PM in response to bob7

Continuing, since I had important email in my Gmail account that was deleted, I next restored all my email folders. With my network connection still off, I opened Mail and got:


"There is a problem with your mailboxes.


Try clicking Quit and then opening Mail again. If this message reappears, click Quit and Rebuild index. The next time you open Mail, it will import your messages.


[two buttons:] Quit Quit and Rebuild inboxes"


Quit didn't solve the problem, so I chose: "Quit and Rebuild inboxes"


I opened Mail, and perhaps all the mail in my inbox that had been deleted was now showing. Yay! Sort of. Once I reestablished the network connection, the server inbox became master and deleted all the messages that I previously deleted and then restored. Perhaps I should repeat the restore with the network connection off, and move the inbox message to a mail subfolder I create, since mail subfolders don't seem to have the problem with the mail server overwriting them.


For my Gmail account, only a handful of messages in my inbox were showing, even after turning on the network connection. I don't know why I was not able to restore the Gmail inbox deleted messages.

Nov 27, 2023 4:00 PM in response to bob7

I decided to try restoring from Time Machine, with Mail not running. I initially restored the 32 char string folder at the same level as my self-created folders, but the inbox contents did not change. Then I restored the entire account ~/Library/Mail/V9/E3A9C34E-ADFD-463D-92C6-FC061A06XXXX . The inbox contents did not change. I figured there was a chance the account was syncing to the mail server and more or less immediately overwriting what I restored, so I repeated the restore and viewing of the inbox with the network connection (wifi) off, but the inbox still did not change.


Side note: Apple's support doc for macOS 12 says to rebuild a mailbox, "…select a mailbox in the sidebar. Choose Mailbox > Rebuild" There is no such option. But even if there were, it wouldn't be viable for my IMAP account because: "When you rebuild mailboxes for IMAP or Exchange accounts, messages and attachments stored on your Mac are discarded, and then downloaded again from the mail server to your Mac."

Nov 27, 2023 6:48 PM in response to bob7

I discovered that besides restoring my account folder with my network connection off, I also had to restore the MailData folder at the same level as my mail store (which did occur when I restored all folders in ~/Library/Mail/V9/E3A9C34E-ADFD-463D-92C6-FC061A06XXXX. Then my inbox messages that had been deleted appeared. However once I connected to the network, the server inbox became master and deleted all the previously deleted inbox messages. I repeated the restores; moved all the inbox messages to a mail folder I created, but after reconnecting to the network, the messages in the folder I placed my inbox messages in goes to count 0 after a bit of time. Odd, because other folders I created at the same level (which apparently never had any messages deleted) still show messages.


I also l need a solution for restoring my Gmail inbox, because that isn't working; not even a temporary showing of previously deleted inbox messages.

Nov 29, 2023 11:07 AM in response to bob7

I believe they stay there, but things can change.


Might be easy to create some Mail Rules to move them from Archived to another Mailbox(es) of your choice.


Oh, & Move & Folders isn't strictly what is happening, gMail just has one giant list of eMails & they get tags of different "folders" & attributes, like read & Unread, Sent, Junk, etc.are just tags.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to restore just an IMAP email account's Inbox folder in TimeMachine

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.