I read somewhere on the Apple forums about this tip.
I wanted to configure my mail account from scratch, in Mavericks, sync the remote e-mails by IMAP and then import the local e-mails.
So, to get my old local On My Mac > Archive
folder I
- Quit Mail.app
- Copied
Archive.mbox
from a backup to~/Library/Mail/V2/Mailboxes
- Deleted from
~/Library/Mail/V2/MailData
the following items- Envelope Index
- Envelope Index-shm
- Envelope Index-wal
- Relaunched Mail.app and proceed with the importing wizard
- Renamed the newly imported folder to
Archive
(until renamed the e-mails show up as blank)
Here, Archive
is just my example mbox
, substitute with yours.