Mail hangs during importing mailbox

When I open Mail I get:


Mail Message Import

This process hangs at 6408 of 17029 messages

Importing mailbox “INBOX - xxAccount”


I have tried the following:


Reinstalled OS 10.11

Turned off Wi_Fi

Made all mail accounts inactive including iCloud me.com accounts


Since the problem seems to be in importing a particular mailbox, is there a way to find the problem in that mailbox or as a last resort to delete that particular mailbox before trying to upgrade?


System with the problem iMac (24-inch Mid 2007)

OS 10.11.2

Have been using OS 10.11 for several months now. Usage is pretty much limited to e-mail and Safari


Problem may have appeared with the OS 10.11.2 upgrade.


Folder ~/Library/mail

Deleted V2 – only thing there was Mailboxes/info.plist

V3 has:

Mac-xxx

Mailboxes

Mail Data

5 POP – accounts

RSS


One of the POP accounts was last touched in 2012 – don’t need it how do I get rid of it?

MacBook Pro (17-inch Mid 2010), Mac OS X (10.7.4)

Posted on Jan 5, 2016 3:02 PM

Reply
2 replies

Jan 7, 2016 3:08 PM in response to entinoco

The new version of Mail stores its database in a different format than the old one, so the database has to be converted before Mail can use it. Sometimes the conversion fails because the old database is corrupt, or because of a bug in the conversion code.

What you should do depends on what kind of mail accounts you have. The first step is to back up all data, if you don't already have a current backup.

A. If you know that you have IMAP or Exchange mail accounts only

The easy way to recover is to discard the old database and start afresh. You can do that without losing any messages, provided that:

☞ All your incoming mail accounts are on an IMAP or Exchange server

☞ You store sent messages on the server

☞ You don't have any "On My Mac" mailboxes

Most well-known independent mail services such as iCloud and Gmail are based on IMAP. On the other hand, ISP-hosted mail services often use POP. If your ISP is one of your mail service providers (or the only one), you may not be able to use this procedure. See the section below in that case.

If you know that the conditions above are satisfied, please continue as follows.

Quit Mail if it's running. Back up all data.

Open the Library folder in your home folder by holding down the option key and selecting

Go Library

from the Finder menu bar. Inside it is a subfolder named "Mail." Move that folder to the Desktop. You're not moving the Mail application; you're moving a folder named "Mail."

Launch Mail. Your mailboxes should be restored automatically. The messages will be downloaded from the servers, so it may take a long time if you have very large mailboxes. Some people have mailboxes in the gigabyte range, and that may be a problem if your bandwidth usage is metered.

If the mailboxes are restored successfully, you can delete the folder you moved to the Desktop. You may have to recreate your Mail rules, signatures, and custom stationery. If it's very important to you not to have to do all that, ask for instructions before deleting the folder.

B. If you have POP or "On My Mac" mailboxes, or if you don't know what you have

Move the Mail folder to the Desktop as in Part A and open it.

Press the key combination command-F to start a search. From the row of search tokens along the upper part of the window, select "Mail". Below that, set as the search criterion

Name ends with mbox

The results of the search will be a list of folders with a name ending in ".mbox". Each one represents a mailbox.

Launch Mail. All mailboxes will be empty at first, but if you have any IMAP or Exchange mailboxes (including iCloud), they should refill automatically after a delay, as in Part A. If you now have all the messages you want to keep, you can stop here. Otherwise, import from the mailboxes in the search results. You'll probably want to skip the ones with names such as "Deleted Messages," "Junk," "Spam," or "Trash." Some may be duplicates of what you already have; those you can delete.

In some cases, a mailbox may fail to import with an error message. If that happens, please post your results.

If all the mailboxes import successfully, you can delete the Mail folder on the Desktop.

Jan 7, 2016 3:18 PM in response to entinoco

Thank you for your prompt reply. This solved 80-90% of my problem. I was able to recover most of the email. One account must have a corrupted file and I will forgo that account. I have the required info on another computer. I did not cover the mailboxes that I used to organized things. All in all we are good enough to go, Other than the mailbox organization and the many, many messages that I had deleted (different from the iMac with the problem) I have the same accounts on my Macbook Pro and have had no problems with the various OS updates over the years.


Thanks again.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail hangs during importing mailbox

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.