Mavericks GMail mailbox loses messages
If it happens again, try the following:
- Right click any Gmail folder that is missing messages and select "Get Account Info".
This forces Mail to search through the entire Gmail account for messages and will restore missing messages in all folders for that account.
The missing mail problem occurred for me when I upgraded from Mountain Lion to Mavericks 10.9.1 with Mail 7.1 (1827). I had unsuccessfully tried:
- clicking "Get new messages in all accounts"
- synchronising the mailbox
- taking the account offline and then back online
- rebuilding the mailboxes
- un-enabling the account, restarting Mail and then re-enabling the account.
Only getting the account info solved the problem for me.
- In Gmail, go to your Labels settings and on the "All Mail" line, uncheck "Show in IMAP".
- Relaunch Mail, missing messages will repopulate.
Note on mail archiving:
When "All Mail" is shown in IMAP, the Archive for that account is the "All Mail" which includes non-archived content, which is part of the problem.
With "All Mail" not shown in IMAP, using the Archive feature in Apple Mail will move messages to a gmail label, "[IMAP]/Archive"
If you want all previous archived messages to be moved into this new Archive folder you need to search in Gmail for
has:nouserlabels -label:inbox
and move old conversations to the "[IMAP]/Archive" label. However this search will include conversations that have some of the messages still in the inbox or some other label. So be careful.