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 :
- In the source machine, the com.apple.mail.plist file will not be found in ~/Library/Preferences, but in ~/Library/Containers/com.apple.mail/Data/Library/Preferences/
- In the destination machine, check if ~/Library/Containers/com.apple.mail already exists. If it does, rename it to something else (like com.apple.mail.old)
- 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.