Apple Mail import failed

升级完系统后, 打开 Mail 发现卡在了 "Import message" 界面上, "Import message error".

打开 Console 看 Logs:

bird[219]: Assertion failed: ![_xpcClients containsObject:client]  
Mail[423]: *** Assertion failure in -[MFIMAPAccount _IMAPMailboxForMailbox:name:createIfNeeded:], /SourceCache/Mail/Mail-1993/MailFramework/IMAP/MFIMAPAccount.m:1652  
Mail[423]: An exception occurred during invocation of -[LibraryImportAssistant synchronouslyDoTheImport]  
Mail[423]: Require mailbox name to create IMAPMailbox for <MFMailbox:0x7fd899c10cd0 (relative path=[Gmail]/Important, attributes=0, displayName=Important uuid=1FD0A4A7-636C-4A3F-A548-968A25162222)>  

看起来应该是前几天改动了 gmail 账号配置("增加 iPhone 端的 Trash mail 支持"), 导致同步的时候报目录错误. 参考了国外友人的方法: link 还是没有解决问题.

最后解法是:

  1. Quit Mail.app
  2. remove ~/Library/Mail/V2/MailData/IMAP-xxxx@imap.gmail.com (至少记得保留 ~/Library/Mail/V2/MailData/MailData/, 账号列表在这里 )
  3. open Mail.app