I’m caught in a messy Apple Mail / IMAP migration and I’m in search of a dependable solution to get better all messages together with attachments from my Mac and add them to a brand new IMAP server.
Context
I had a number of mailboxes (about 11 accounts) on Supplier A (Hetzner).
On macOS Apple Mail, I configured these accounts by way of IMAP about 48h earlier than migration.
Then the area and mail moved to Supplier B (Keliweb/cPanel). Mailboxes have been recreated with new passwords.
The IMAP hostname stayed the identical: mail..tld, so after DNS change Apple Mail now factors to the brand new server, however my outdated Apple Mail accounts are “damaged/offline” as a result of password mismatch.
Supplier A now not has knowledge accessible (outdated server/mailboxes are gone).
What I’ve
In Apple Mail, despite the fact that the outdated accounts are offline and maintain asking for password, I can nonetheless see all emails and even very giant attachments when opening messages (offline too).
I additionally discovered a full native Mail retailer at ~/Library/Mail/V10/ with UUID folders per account, many .emlx and a few .partial.emlx, and attachment recordsdata beneath deep paths like: …/Information/…/Attachments/.pdf
Complete native Mail retailer is ~7 GB.
Objective
Add all the pieces into the brand new server.
I created an enormous archival mailbox [email protected] on the brand new server (20GB quota) with folders like:
pink//INBOX, SENT, ARCHIVE, and so on.
Issues
Apple Mail copying/importing by way of IMAP is unreliable. Bulk copy typically “prepares”, then stops mid-way, leaving solely a small portion uploaded and no clear errors.
Importing from V10 into Thunderbird loses attachments. If I import .emlx (or listing/subdirectory import), most messages seem with out attachments (e.g. 50/600 have attachments).
Exporting “On My Mac” mailboxes created whereas accounts have been already offline produces tiny exports (KB), so these native “restoration folders” aren’t actual full copies.
AppleScript automation shouldn’t be accessible: Apple Mail on my macOS doesn’t help the save command for messages (“Mail can’t perceive the message ‘save’”).
What I attempted
Apple Mail: copy messages into “On My Mac” folders → export mailbox → export is tiny (KB) for large mailboxes.
Thunderbird + ImportExportTools NG: import from V10 directories → construction imports however attachments principally lacking.
Single-message drag from outdated cached view to new IMAP generally works, however bulk operations fail or are inconsistent.
Query
Provided that:
the outdated server is gone,
Apple Mail nonetheless shows the complete messages with attachments,
attachments exist as recordsdata on disk beneath V10 “Attachments” paths,
What’s the greatest identified methodology to reconstruct/ export full MIME messages (together with attachments) from Apple Mail’s native retailer and re-upload them to a brand new IMAP account?
I’m open to:
scripts/instruments (Python, shell, and so on.),
parsing .emlx + linking to attachment retailer,
any identified utilities that may rebuild .eml/mbox with attachments from Apple Mail V10.
More information I can present
macOS model (inform me what precise information you want),
pattern .emlx headers (redacted),
listing format beneath V10 for one mailbox,
whether or not .partial.emlx are concerned for lacking attachments.
Thanks so much — any pointers or confirmed workflows can be massively appreciated.
