Recovering mail from Apple Mail after mail server died
I have what appears to be a somewhat obscure problem with mail.
I used to have an IMAP server (hMailServer), set up to catch mail from another email provider. The hMailServer died (no backup, alas), leaving me only with local copies of the messages in Apple Mail on my Macbook. About 11k or so, which I would love to restore into my Gmail account.
However, it appears some of the messages were not fully downloaded from the hMailServer into Apple Mail and they show as headers only, but empty body messages. That seems to cause havoc in anything I try to do to get even the fully downloaded messages transferred to Gmail or saved as a local mailbox on Macbook.
- I tried rebuilding but, of course, that won't work since the messages cannot be re-downloaded from the original but now dead hMailServer.
- I tried copying, using the Apple Mail copy function, from the now-offline mail ex-hMailServer inbox in Apple Mail to Gmail. Apple Mail reports the messages were copied into Archive folder on Gmail (indicated by both the message count in Apple Mail as well as the mailbox info report, corresponding to the Gmail mail account), but they really do not exist on Gmail (when I log into it through cloud web interface).
- Tried exporting the hMailServer inbox using AppleMail export function, none of the messages from that inbox get exported.
- My attempt to use search and sort functions in Apple Mail to identify which of the 11k message bodies are empty resulted in nothing; Apple Mail still thinks those messages contain whatever they did originally. Except they don't.
So I really have no clue what to do now to recover whatever I can at this point.
Would appreciate any suggestions.