I use Apples Mail.app since – forever. My local Mail-Archive consists of about 130'000 E-Mails from multiple accounts, stored in hundreds of folders, localy on one of my Macs. The archive goes back 18 Years! The oldest E-Mails are from 2002!

Now I finally want to have all of them available all the time from everywhere on every device I own. Therefore I want to migrate those thousands of emails to my IMAP-Accounts (3x GMail, 1x iCloud, 1x private Server; I have multiple accounts 'cause of work, honorary activity, personal etc).

Whats the most efficient way to migrate such a large local archive to a single IMAP-Account? (or if possible even better: multiple Accounts?)

Some notes:

  • It's OK if I loose the structure of the current local archive (The folder hierarchy)
  • Since many of the (older) messages are from E-Mail-Accounts not longer active or existing (f.e. old @yahoo.com Mails), it's OK if I have to move many of them to a IMAP-mailbox in another Account (f.e. to my current iCloud-Account)
  • If there is no easy way to split the local Archive and move some messages to Account X and others to Account Y, it's OK if I have to move all Mails to just one IMAP-Account (yet: Gmail, iCloud, private … which should I choose? Size of Storage is no problem on all accounts ;-) )

I thought about creating a new Smart Mailbox and filter the whole local archive for all E-Mails of OldAccount001, then move them by hand (drag-and-drop) to the «Archive»-Mailbox of my CurrentAccount001 … then edit the Smart Mailbox to filter the whole local archive for all E-Mails of OldAccount002 and move them to the «Archive»-Mailbox of my CurrentAccount002 et cetera parge parge … this way I sure loose all the structure (folder hierarchy), but I can live with that … but will this actually work? Again: I'm speaking about thousands of locally stored E-Mails, some 18 years old, many of them from accounts no longer existing – of course many of them with Attachments etc.

  • 1
    I think you should be able to just drag and drop them into an imap folder and wait. I know I've done that to move emails from one imap account to another. Commented Mar 4, 2020 at 20:26
  • 1
    Curious.... Are you hosting your own IMAP server or are you using another one? Also, how often are referring back to these emails that you need to a) have them online, b) incur the cost of that kind of storage, and c) incur the cost of migrating them.
    – Allan
    Commented Mar 4, 2020 at 20:43
  • @DonaldHosek would that mean that removing folders from an imap folder removes them for server too ? coz it doesn't.
    – anki
    Commented Mar 4, 2020 at 20:58
  • @ankii no, when I do the drag and drop from one account to the other, I still need to delete the dragged message from the source account. Commented Mar 4, 2020 at 21:26
  • Can't you simply select all then move to [IMAP mailbox]?
    – TimD
    Commented Mar 5, 2020 at 4:06

2 Answers 2


Whats the most efficient way to migrate such a large local archive to a single IMAP-Account?

Unfortunately, the most efficient way to do this is to migrate from one IMAP server to another. I say unfortunately, because this is something that happens at the server level and not via the user.

In all of the migrations I've been involved with (all from something to Exchange), we kept migration to a minimum and archived everything. That archive remained "online" for reference only (it didn't accept new mail) and new folders couldn't be created. After a number of years (3, I believe) it went to permanent archive in which we took it offline and only went to it if there was reason to do so (like legal subpoena).

In the end, migration was simply too costly (time, labor, efficiency, dollars) so it's rarely done.

In your case, unless you have access to the back end of the servers, your service providers are not likely at all to accommodate the request. So, unfortunately, getting those mails over to your new server is going to be a manual process.

With all that said, my recommendation is to move away from the (dated) IMAP severs and look at Exchange. It's the gold standard. You can get a hosted Exchange account from Microsoft for $8 per user per month and it's a much better solution than pretty much anything else offered.


I've had success by first organizing the mail into local "On My Mac" mailboxes in Apple Mail, then exporting those mailboxes using the Mailbox > Export Mailbox menu item. This creates a folder containing a standard .mbox file. Finally, this python script, IMAP Upload, can upload the contents of the mbox file to an IMAP server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .