Transfer Your Apple Mail to a New Mac

01
of 05

Transfer Your Apple Mail to a New Mac

MacBook image with mail
Setting up Mail again from scratch is a waste of time. Instead, migrate your Mail from a previous Mac. alexsi / Getty Images

Moving your Apple Mail to a new Mac, or to a new, clean install of the OS, may seem like a difficult task but it actually only requires saving three items and moving them to the new destination.

There are a few ways to perform the move. By far the easiest, and the most often suggested method is to use Apple’s Migration Assistant. This method works well in most cases, but there’s one drawback to the Migration Assistant. Its approach is mostly all-or-nothing when it comes to moving data. You can select some basic categories, such as applications or user data, or just support files, and most of the time it works fine.

Where you can run into problems is when there’s something wrong with your Mac. You’re not sure what it is, maybe a corrupt preference file or a system component that’s a little whacky, and causes problems now and then. The last thing you want to do is copy a bad file to your new Mac or new install of OS X. But starting over completely doesn’t make sense, either. You may have years of data stored on your Mac. While some of it may be fluff, other pieces of information are important enough to keep on hand.

While it may be easy to recreate your mail accounts on a new system, it’s not easy to start off fresh, with none of your older email available, your Mail rules gone, and Mail always asking for passwords that you may have long since forgotten.

With that in mind, here’s a simple way to move just the data Apple Mail needs to a new location. When you’re done, you should be able to fire up Mail on your new system and have all your emails, accounts, and rules working just the way they did before the move.

What You Need to Move Mail

  • A way to transfer files to the new location. You can transfer your files over a network, burn them to a CD or DVD, copy them to a USB flash drive, or, if the new system is on the same Mac, copy them from one drive partition to another. We won’t discuss the actual mechanism you use to perform the transfer, only which source files need to be copied, and where they need to be stored in your new installation.
  • Administrative access to your data. You may need to change the file privileges, although, for most users, this will probably not be necessary.

Before you Begin, Back Up

Before you start moving files around, make sure you have a current backup of your mail.

Back Up Data Using Time Machine

Select the 'Back Up Now' item from the 'Time Machine' icon in the menu bar or right-click the 'Time Machine' icon in the Dock and select 'Back Up Now' from the pop-up menu. If you don't have the Time Machine menu bar item, you can install it by doing the following:

  1. Launch System Preferences by clicking the 'System Preferences' icon in the Dock, or selecting 'System Preferences' from the Apple menu.
  2. Select the 'Time Machine' preference pane in the System Preferences window.
  3. Place a check mark next to 'Show Time Machine status in the menu bar.'
  4. Close System Preferences.

You can also create a backup using one of many third-party applications. Once you back up your data, you're ready to continue.

If you’re all set, then let’s get started.

02
of 05

When Moving Apple Mail Copy Your Keychain Data

USB Flash drive with keychain
Before copying your Keychain files, make sure they are in good shape by running Keychain First Aid. Jim Cragmyle / Getty Images

There are two folders and a file that need to be copied to your new Mac or your new system. You will actually be copying data for both Apple Mail and Apple's Keychain application. The Keychain data you copy will allow Apple Mail to operate without asking you to supply all of your account passwords. If you only have one or two accounts in Mail, then you can probably skip this step, but if you have many Mail accounts, this will make using the new Mac or system easier.

Before you copy the Keychain files, it's a good idea to repair the files to ensure the data within them is intact. If you're using OS X Yosemite or earlier, the Keychain Access app includes a handy first aid tool that you can use to verify and repair all of your keychain files. If you're using ​OS X El Capitan or later, you'll find the Keychain Access app is missing the first aid feature, requiring you to use a different, and unfortunately less effective, method of ensuring your Keychain files are in good shape.

Repair Your Keychain Files (OS X Yosemite and Earlier)

  1. Launch Keychain Access, located in /Applications/Utilities.
  2. Select 'Keychain First Aid' from the Keychain Access menu.
  3. Enter the User Name and Password for the user account you are currently logged in with.
  4. You can perform just a 'Verify' to see if anything is wrong, or you can select the 'Repair' option to verify the data and repair any problems. Since you have already backed up your data (you did back up your data, right?), select 'Repair' and click the 'Start' button.
  5. When the process is complete, close the Keychain First Aid window, and then quit Keychain Access.

Verify the Integrity of the Keychain Files (OS X El Capitan or Later)

As mentioned above, the Keychain Access app lacks the basic first aid capabilities, a definite oversight by Apple. The best you can do until Apple provides a new first aid tool is to use Disk Utility's ability to verify/repair the startup drive that contains the Keychain files.

You can find instructions on using Disk Utility’s First Aid feature in the guide:

Repair Your Mac's Drives With Disk Utility's First Aid

Follow the instructions in the above guide, and then return here.

Copy the Keychain Files to the New Location

The Keychain files are stored in the users /Library folder. As of OS X Lion, the users /Library folder is hidden so that users can’t accidentally make changes to important files used by the system.

Thankfully, the hidden users /Library folder is easy to access and can even be made permanently visible, if you wish.

Before performing the Keychain file copy instruction below, read and follow the instructions in the guide:

OS X Is Hiding Your Library Folder

Once the users /Library folder is visible, return here and continue.

  1. Open a Finder window by clicking the 'Finder' icon in the Dock.
  2. Navigate to username/Library/, where 'username' is the name of your home directory.
  3. Copy the Keychain folder to the same location on your new Mac or in your new system.
03
of 05

Copying Your Apple Mail Folder and Preferences To a New Mac

Moving Apple Mail: Copying Your Mail Data
The com.apple.mail.plist file contains your Mail accounts and preferences.

Moving your Apple Mail data is a pretty simple task, but before you do, you may want to take a bit of time to clean up your current Mail setup.

Apple Mail Cleanup

  1. Launch Apple Mail by clicking the 'Mail' icon in the Dock.
  2. Click the 'Junk' icon, and verify that all of the messages in the Junk folder are indeed junk messages.
  3. Right-click the 'Junk' icon and select 'Erase Junk Mail' from the pop-up menu.

Apple Mail Rebuild

Rebuilding your mailboxes forces Mail to re-index each message and update the message list to accurately reflect the messages actually stored on your Mac. The message index and the actual messages can sometimes get out of sync, usually as the result of a Mail crash or an unintended shutdown. The rebuild process will correct any underlying issues with your mailboxes.

If you use IMAP (Internet Message Access Protocol), the rebuild process will delete any locally cached messages and attachments, and then download fresh copies from the mail server. This can take quite a while; you may decide to forgo the rebuild process for IMAP accounts.

  1. Select a mailbox by clicking once on its icon.
  2. Select 'Rebuild' from the Mailbox menu.
  3. Once the rebuild is done, repeat the process for each mailbox.
  4. Don’t be alarmed of the messages within the mailbox seem to disappear during the rebuild process. Once the rebuild is complete, reselecting the mailbox will reveal all of the stored messages.

Copy Your Mail Files

The Mail files you need to copy are stored in the users /Library folder. This folder is hidden by default in OS X. You can use the instructions in the guide OS X is Hiding Your Library Folder to make the user /Library folder visible. Once the folder is visible, you can continue on.

  1. Quit Apple Mail if the application is running.
  2. Open a Finder window by clicking the 'Finder' icon in the Dock.
  3. Navigate to username/Library/, where 'username' is the name of your home directory.
  4. Copy the Mail folder to the same location on your new Mac or in your new system.

Copy Your Mail Preferences

  1. Quit Apple Mail if the application is running.
  2. Open a Finder window by clicking the 'Finder' icon in the Dock.
  3. Navigate to username/Library/Preferences, where 'username' is the name of your home directory.
  4. Copy the 'com.apple.mail.plist' file to the same location on your new Mac or in your new system.
  5. You may see files that seem similar, such as com.apple.mail.plist.lockfile. The only file you need to copy is the com.apple.mail.plist.

That's it. With all the necessary files copied to the new Mac or system, you should be able to launch Apple Mail and have all of your emails in place, your Mail rules functioning, and all Mail accounts working.

04
of 05

Moving Apple Mail - Troubleshooting Keychain Issues

iCloud Keychain - Changing Phone Number
The easiest way to move your keychaing files to a new Mac is with iCloud Keychain. Screen shot courtesy of Coyote Moon, Inc.

If something can go wrong, it usually will, and moving Keychains around can cause a problem. Luckily, it is easy to correct.

Problems With Keychain

When you try to copy the Keychain file to its new location on your new Mac or system, the copy may fail with a warning that one or more Keychain files ​is in use. This can happen if you have already used your new Mac or system, and in the process, it created its own Keychain files.

If you're using OS X Mavericks or earlier, you can use the following steps to work around the problem:

  1. Launch Keychain Access, located in /Applications/Utilities, on your new Mac or system.
  2. Select 'Keychain List' from the Edit menu.
  3. Make a note of which Keychain files in the list have a check mark next to their name.
  4. Uncheck any checked Keychain files.
  5. Repeat the instructions on Page 3 to copy the Keychain files to your new Mac or system.
  6. Reset the check marks in the Keychain list to the state you noted above.

If you're using OS X Yosemite or later, you can use an alternate method of getting your new Mac or system to use your existing Keychain files. Instead of copying the files, you can make use of iCloud and it’s ability to sync Keychains between multiple Macs and iOS devices to achieve the same results.

You can follow the instructions in: Guide to Using iCloud Keychain to setup and manage your Mac’s Keychain system.

05
of 05

Moving Apple Mail - Troubleshooting Mail Issues

Mac Mail app shown running on macOS Sierra
After you transfer your mail data, the Mail app should display all of your mail messages. Screen shot courtesy of Coyote Moon, Inc.

Moving mail files between systems can cause permission problems. Fortunately, these problems are easy to correct.

Problems With Copying Mail Files

Occasionally, you may run into a problem when you first launch Apple Mail on your new Mac or system. The error message will usually tell you that Mail does not have permission to access a file. The usual culprit is username/Library/Mail/Envelope Index. Make a note of which file is listed in the error message, then do the following.

  1. Quit Apple Mail, if it’s running.
  2. Open a Finder window by clicking the ‘Finder’ icon in the Dock.
  3. Navigate to the file mentioned in the error message.
  4. Right-click the file in the Finder window and select ‘Get Info’ from the pop-up menu.
  5. In the Get Info window, expand the ‘Sharing & Permissions’ item.
  6. Your username should be listed as having Read & Write access. You may find that, because the account IDs between your old Mac and the new system are different, instead of seeing your username listed, you see ‘unknown.’ To change the permissions, do the following:
  7. Click the lock icon in the bottom right corner of the Get Info window.
  8. Enter your administrator username and password, and click ‘OK.’
  9. Click the ‘+’ (plus) button.
  10. The ‘Select a New User or Group’ window will open.
  11. From the list of users, click your account, and click ‘Select.’
  12. The selected account will be added to the Sharing & Permissions section.
  13. Select the ‘Privileges’ item for the account you added in the Get Info window.
  14. From the Privileges dropdown menu, select ‘Read & Write.’
  15. If there is an entry with the name ‘unknown,’ select it, and click the ‘-’ (minus) sign to delete the entry.
  16. Close the Get Info window.

That should correct the problem. If Apple Mail reports a similar error with another file, you may want to just add your username to every file in the Mail folder using the Propagate command.

Propagating Your Privileges

  1. Right-click the Mail folder, located at username/Library/.
  2. Using the instructions above, add your username to the Permissions list, and set your permissions to ‘Read & Write.’
  3. Click the gear icon at the bottom of the Get Info window.
  4. Select ‘Apply to enclosed items.’
  5. Close the Get Info window and try launching Apple Mail again.

You can also try reseting user permissions, if all else fails.

That’s it. You should be ready to go with Apple Mail.