Skip to content

Instantly share code, notes, and snippets.

@kcramer
Last active June 9, 2020 06:34
Show Gist options
  • Save kcramer/5912bdad090c390d04e449174ea17b16 to your computer and use it in GitHub Desktop.
Save kcramer/5912bdad090c390d04e449174ea17b16 to your computer and use it in GitHub Desktop.
Transfer Apple Mail on macOS 10.13 from a backup or another Mac

To transfer mail from a backup or another Mac, you need to copy over the following files. Be sure the permissions remain the same. Using command line utilities such as cp -rp and tar should preserve the attributes as much as possible.

For the folders, back up any existing version on the new machine, then delete the folders, before copying the data so no old files remain. The Preferences files can just be copied over any existing versions.

Make sure you shutdown Apple Mail and the other Apple apps before copying over the data. Log out and back in before restarting Apple Mail.

Folders and files to transfer:

  ~/Library/Mail
  ~/Library/Accounts
  ~/Library/Containers/com.apple.mail
  ~/Preferences/com.apple.mail.plist
  ~/Preferences/com.apple.mail-shared.plist
  ~/Preferences/com.apple.accounts.plist
  ~/Preferences/com.apple.accountsd.plist

This list worked correctly for macOS High Sierra 10.13.6. All of my IMAP and On My Mac folders were shown after copying over existing data on a second Mac. There was no need to import mailboxes from the original data. Copying just the mail data and not the account data resulted in the On My Mac folders not showing up in Mail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment