Apple Mail, Migration Assistant and Sandboxing

I’ve discovered the hard way that OS X’s Migration Assistant does not play nice with sandboxed applications, even its own. After moving my user to another machine, everything seemed all right, but mail kept asking me for account details.

I didn’t want to reconfigure my email — and re-download 10 Gb worth of past history — so I decided to investigate what was the matter. The standard instructions haven’t worked and the reason is that Apple Mail runs sandboxed in its container. In order to make those instructions to work, the following adaptations are needed :

  1. In the source machine, the file will not be found in ~/Library/Preferences, but in ~/Library/Containers/
  2. In the destination machine, check if ~/Library/Containers/ already exists. If it does, rename it to something else (like
  3. Follow all other instructions unchanged — they can be used to restore/repair Apple Mail after a migration with Migration Assistant, or to just transfer Apple Mail from a machine to another. I was in the former case, and omitted the Keychain transfer step, without any problems — I figured it was transferred by Migration Assistant.

When you run Mail on the first time in the destination machine, it will not find the sandboxed container and it will recreate it with the correct data and settings provided out of the sandbox.

I wonder if similar procedures — mutatis mutandis — apply for other sandboxed applications that encounter migration troubles. If you find out, please drop me a note.

2 thoughts on “Apple Mail, Migration Assistant and Sandboxing

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s