Migrating Mail to a new Mac
I see a lot of people asking how to do this, so I’ll share my recent experience. If you ask how to transfer POP Mail accounts between Macs, you’ll typically be told to just use Apple’s Migration Assistant. Indeed, if you want your new Mac up and running quickly, do this! If however, your Mac has accumulated years of old data and you don’t like the idea of migrating a ton of redundant (and potentially corrupt) Library files, you may want to do a clean install. Apple, unfortunately, doesn’t imagine that users want to do this, so its documentation on manual migration are scant at best. (In your search, you may also encounter a number of faithful Apple forum regulars who will tell you that clean installs are never needed and that in all their years they have never encountered a corrupt preference file or erratic behaviour on their Mac. Just smile and congratulate them on their good fortune.)
If you go to Google you’ll find that most articles tell you it’s a simple matter of copying the ~/Library/Mail folder and one or two preference files. Unfortunately, this old method hasn’t worked for some years. Mail account information is now stored within ~/Library/Accounts, and transferring it isn’t as simple as it should be.
The most helpful answer I found was this one by apple_mikey in the Manual Mail Migration discussion.
However, this comment is over two years old now, and I still had some problems trying to migrate Mail between El Capitan (10.11) and High Sierra (10.13).
First problem: The database files within Library/Accounts don’t appear to be compatible. At the very least, the names have changed, from ‘Accounts3.sqlite’ to ‘Accounts4.sqlite’. If you simply overwrite the Accounts folder or otherwise delete the ‘Accounts4.sqlite’ files, High Sierra just creates new ones, and the old accounts aren’t recognised. So I tried simply editing the file name, replacing the ‘3’ with a ‘4’. After a restart, the old accounts were all there!
Second problem: None of my email accounts would recognise the correct passwords. I knew I was using the correct passwords, but no matter how many different ways I tried to enter them, it kept saying ‘Unable to verify account name or password’.
This issue is discussed in some detail in the article, How to solve the Apple mail Unable to verify account name or password issue. I had partial success with the technique described there. Sometimes it worked, sometimes it didn’t. This wasn’t the solid, predictable feel I wanted from my clean install!
On top of this, none of the mailboxes under ‘On My Mac’ (all the folders used by my Mail rules to organise mail) had migrated across.
In frustration I finally gave up, and decided to just recreate every account on the new Mac, export each of the mailboxes from the old Mac, and import them into Mail on the new Mac. This is a tedious process, but it mostly works. It goes something like this:
- In Mail on the old Mac, select the corresponding In and Sent mailboxes for each account and choose ‘Export Mailbox’ from the Mailbox menu.
- Rename the mailbox files in the Finder to distinguish them from other accounts' mailboxes.
- Transfer these files to your new Mac. (I transferred all files via a Thunderbolt cable. Lightning fast.)
- In Mail on the new Mac, set up each of your accounts.
- Depending on your POP settings, Mail may start downloading a week’s worth of previously downloaded messages and marking them unread, which probably isn’t what you want. You can delete these messages from the server first (which is what I did), or delete them after they have downloaded and before you import.
- Choose 'Import Mailboxes' from the File menu and select the mailbox files you previously exported for each account.
- You now want to move the imported messages to each account’s Inbox and Sent mailboxes. By default, Mail does not display a Sent mailbox for an account until you have actually sent something. This makes for a clean typically-Apple interface, but isn’t helpful when you need to drag files to an invisible mailbox! To address this, I sent an email to nobody@mydomain from each account, which created the corresponding Sent mailboxes.
- You’ll find all your imported mailboxes in a folder labelled ‘Import’ within ‘On My Mac’ in the sidebar. Click on each mailbox, select all the messages (I use Mail’s ‘classic layout’ for this), and drag them to the corresponding account’s Inbox or Sent mailbox.
- Check that all the Import folders/mailboxes are now empty before deleting them.
- Import any other ‘On My Mac’ mailboxes that you had on your old system, and move them out of the Import folder, so they are directly within ‘On My Mac’.
I say this ‘mostly’ worked, because upon import I received the warning that ‘Some messages could not be imported’. Sigh. You can always compare the number of messages between your old Mac and new to see what the damage is.
I hope someone finds this helpful.
It would be great if Apple simplified this by providing a way to export accounts, rather than just mailboxes. Imagine being able to export an email account, complete with all settings (minus passwords for security), and simply imported the account on the new Mac to resurrect all the associated mailboxes and messages. I’m sure Apple could make this a beautifully simple experience if they put their clever minds to it.
iMac (Retina 5K, 27-inch, 2017), macOS High Sierra (10.13.2)