After I upgraded to Mavericks I noticed that some of my mailboxes in Mail became empty, or that some emails had a title, but no content.
After digging around for a while in
~/Library/Mail I noticed that the affected mailboxes had been duplicated.
An example was a mailbox that was named “VMware”. There were 2 of them now. One named “VMware.mbox” and one named “VMware-2.mbox”. Mail was picking up “VMware.mbox”, and it had no content.
I got back all my content by doing the following:
1) Quit Mail.
rm -rf VMware.mbox (be careful with this command!)
mv VMware-2.mbox VMware.mbox
4) Start Mail
5) Select the mailbox “VMware”
6) From the menu, select “Mailbox->Rebuild”
I did the above for all the mailboxes that exhibited this behavior (4 mailboxes in total) and everything was restored.