Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gank41

macrumors 601
Original poster
Mar 25, 2008
4,380
5,062
Hi everybody, After installing Sonoma on my 2018 Intel Mac mini, Apple's Mail App all of a sudden decided it wanted to "Import my Mail" in order to continue.. Ok, sure. That happens from time to time with different app databases needing to be updated and whatnot. Well, in my case, maybe yours, I was getting a message saying the Mail Import Failed, and my only option was to Quit Mail. I had filed FB13278368, but was expecting nothing from the message in a bottle I tossed into one of the oceans.

I had tried a number of combinations of things, but ultimately found this to work:

With the System Settings App Closed and the Mail App Closed (it doesn’t open for me anyway), I deleted the three files in the following folder-

Library > Mail > V10 > MailData:

Envelope Index-shm
Envelope Index-wal
Envelope Index



Then I disabled the Mail Option for Each Account in the System Settings app under Internet Accounts. All of 'em. I had a few.

Then when I opened the Mail App it gave an alert tone quickly like there was an issue, but then it looked to just be setup with “Local folders” like Sent, Drafts, Inbox, etc…

At that point I went back and manually enabled each Mail account in the System Settings app under Internet Accounts, and although they showed up, they all were listed as offline. I selected Take all accounts online from the Mailbox Menubar option, and they all connected and everything is now up to date. I waited a few minutes until everything was listed as "All Folders Up to Date", Quit Mail and waited roughly 30 seconds or so, and then was able to reopen the Mail app normally and everything was still connecting and up to date...

Hopefully this can help someone else in the future.
 
I ran into this exact issue after migrating to an M3 Pro MacBook Pro. I followed your steps and things started working for me again as well. Thank you!
 
  • Love
Reactions: gank41
I ran into this exact issue after migrating to an M3 Pro MacBook Pro. I followed your steps and things started working for me again as well. Thank you!
Awesome! Glad this was able to help you out. :)
 
I have exactly the same problem, but it was trying to import 140,000 msgs!. I contacted Apple support who were extremely helpful and spent about 45 minutes helping me delete several folders in the Mail section of Library. This reduced the number of msgs to about 13,000 but still it failed. I followed Gank41's procedure which reduced the import to about 4000. It failed the first time and I started writing this msg but tried again and this time mail opened. So thanks very much.
 
  • Love
Reactions: gank41
I had the same problem too. An internet search brought me here. I followed Gank41's procedure. It failed the first time, tried again and this time my mailboxes opened. Now it's downloading... So thanks very much.
 
  • Love
Reactions: gank41
I found it's only the iCloud mail that's the problem. I disabled all but that one and it still happened. After disabling that one too, then it loaded up and I had to reenable all manually.
 
  • Like
Reactions: gank41
I had tried a number of combinations of things, but ultimately found this to work:
My problem is that the On My Mac folders disappeared.
I really appreciate @gank41 for his fix. And those of you who provided additional info. That's what makes these forums so great. I can't resist adding that it takes a village to fix macOS.😁
Have any of you lost your On My Mac folders?
I found those folders on an old Time Machine disk I switched out in June 2023, so at least I know where the older ones are. But how do I merge them into the current ~/<user>/Library/Mail/V10 structure? And do I need to do something with the PersistenceInfo.plist?
 
Last edited:
  • Like
Reactions: gank41
My problem is that the On My Mac folders disappeared.
I really appreciate @gank41 for his fix. And those of you who provided additional info. That's what makes these forums so great. I can't resist adding that it takes a village to fix macOS.😁
Have any of you lost your On My Mac folders?
I found those folders on an old Time Machine disk I switched out in June 2023, so at least I know where the older ones are. But how do I merge them into the current ~/<user>/Library/Mail/V10 structure? And do I need to do something with the PersistenceInfo.plist?
I actually don’t even use the On my Mac folders at all! Totally opposite I think. I have it turned off, and from time to time still find “orphaned” emails or folders even in the side bar for an On my Mac folder and I don’t know why. Like something failed and it ended up there.
¯\_(ツ)_/¯
 
  • Sad
Reactions: ThrowerGB
I deleted the three files in the following folder-

Library > Mail > V10 > MailData:

Envelope Index-shm
Envelope Index-wal
Envelope Index



Then I disabled the Mail Option for Each Account in the System Settings app under Internet Accounts.

In safe mode (I don't know whether that makes a difference) and with wifi off (ditto), I deleted those three Envelope files. I went to try disabling the mail options in each account as you suggested, but couldn't get that function to work... it would not let me slide the blue indicator from active to inactive. Nevertheless, it fixed the problem. Next time I ran Mail, it properly completed the import (regenerating those three envelope files).
 
  • Like
Reactions: gank41
I followed your steps Gank41- thank you, by the way for helping a ton of folks.

I'm still getting 'The import failed ' message.....'an error occurred during the import. Make sure you have available space in your home folder and try again'

Any suggestions? ( 2019 iMac, Sonoma 14.4.1) Appreciate any input
 
I followed gank41's instructions with one exception: I restarted the computer into Safe Mode. The import was failing until I did that. I proceeded with the import in Safe Mode and then restarted into regular mode and all is well.
 
  • Like
Reactions: gank41
I followed gank41's instructions with one exception: I restarted the computer into Safe Mode. The import was failing until I did that. I proceeded with the import in Safe Mode and then restarted into regular mode and all is well.
Good to know! If it worked in Safe Mode and not while logged in normally, to me, that would imply something hinky with the app itself where it just wasn’t able to clear its entire cache.
 
I had tried a number of combinations of things, but ultimately found this to work...I deleted the three files in the following folder-

Library > Mail > V10 > MailData:

Envelope Index-shm
Envelope Index-wal
Envelope Index



Then I disabled the Mail Option for Each Account in the System Settings app under Internet Accounts...I went back and manually enabled each Mail account...
In my case, deleting those three files was enough, I did not have to then disable or re-enable anything. (Possibly because my email accounts are POP3 and not IMAP.) One caveat though... any emails that you had "open" will no long be open after the import. So if you have things "in progress" in open windows that you are still dealing with, you should close them (or make note of them), so you won't lose your "current operating status" after the upgrade.
 
  • Like
Reactions: gank41
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.