Mail.app constantly re-downloading hundreds of IMAP messages

For a couple years now, Mail.app (on a 2012 MBP running Catalina) has frequently shown mysterious sending activity that doesn't correspond to any recent messages — getting stuck "Sending 6 of 7" or "Sending 18 of 19," but always stuck on the second-to-last message, even though no group message has been sent. I've posted here a couple times about that and haven't been able to find a solution.


But now it's gotten worse with a new problem: Every day Mail.app now wants to re-download/re-sync hundreds to thousands of emails. This computer lives at a remote ranch that can only get online via satellite, which has a 10GB/mo limit — and all that bandwidth is being used up in a matter of days because Mail won't stop doing this:



If Mail is left running, it will do this dozens of times a day — often removing hundreds of emails from the Inbox and re-downloading them.


Any suggestions on how to track down this problem?


Deleting and recreating the account isn't an option because, as mentioned above, there's not enough bandwidth to re-download 25 years of mail — and there's no guarantee this would fix the problem. I'd like to figure out the cause.


(I have a sample from Activity Monitor, but I haven't uploaded it anywhere because the last time I did that, I found out it included OAUTH data.)

Posted on Aug 21, 2021 3:03 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 21, 2021 6:54 PM

When you "Rebuild" a Mailbox, it will say it is downloading messages. It is actually just scanning every email on disk and writing the information into its database. That may be what you are seeing.

It obviously shouldn't need to do that, either, but it may be finding the database corrupt and is rebuilding it.

If it is having trouble writing to the database, deleting it and letting it recreate the database may solve the problem.

Its name is "Envelope Index" and there are two other database log files, -shm, -wal.

They are located in ~/Library/Mail/V8/MailData/

With Mail closed, delete all three, then open Mail. You should see the Downloading messages status in the Activity window.

If your user Library is hidden (default), you can open it by holding down the Option key and selecting Library from the Go menu in Finder.

16 replies
Question marked as Top-ranking reply

Aug 21, 2021 6:54 PM in response to 100 Watt Walrus

When you "Rebuild" a Mailbox, it will say it is downloading messages. It is actually just scanning every email on disk and writing the information into its database. That may be what you are seeing.

It obviously shouldn't need to do that, either, but it may be finding the database corrupt and is rebuilding it.

If it is having trouble writing to the database, deleting it and letting it recreate the database may solve the problem.

Its name is "Envelope Index" and there are two other database log files, -shm, -wal.

They are located in ~/Library/Mail/V8/MailData/

With Mail closed, delete all three, then open Mail. You should see the Downloading messages status in the Activity window.

If your user Library is hidden (default), you can open it by holding down the Option key and selecting Library from the Go menu in Finder.

Aug 31, 2021 9:14 PM in response to 100 Watt Walrus

UPDATE:

• Moved everything in the Inbox and Sent to their own "On My Mac" folders (where everything else is stored anyway)

• Deactivated IMAP account

• Activated POP instead


That was only a few hours ago, but (obviously) this should solve the problem.


Shouldn't have come to this, but IMAP isn't needed on this account anyway since this Mac is the only device used to access it.


Thanks, Steve. Thanks, Barney.

Aug 21, 2021 4:18 PM in response to 100 Watt Walrus

I have noticed this with MS-Exchange accounts. I don't see it with GMAIL or POP accounts. With the Exchange accounts, I see this behavior on multiple Macs running everything from El Capitan (10.11.6) through Catalina (10.15.7).



I believe it may have something to do with the way the Exchange server tracks changes or messages, and the Apple Mail interface.


However, one of the Macs I use on Catalina uses MS-Outlook, not Apple Mail, for the Exchange emails. The Apple Mail on that Mac is still used for GMAIL and the POP account, but it comes up and updates instantly without this undesired behavior. I see it only with Exchange and on the other Macs that aren't using Outlook but are using Apple Mail.


You might consider switching to Outlook if you are using Exchange emails. Outlook does not exhibit this behavior at all. At one point I even had both Outlook and Apple Mail accessing the Exchange IMAP emails on the same computer. Apple Mail behaved in the way you describe, but Outlook did not do all that downloading.


Given your situation with the remote location and bandwidth limitations, I think this is something of a showstopper for you and it might be worth trying Outlook. But if your IMAP account is not an Exchange one, I'm not sure if what I am suggesting is the best approach.


Another possible thing to investigate -- do you keep very large Sent or Deleted (Trash) mail folders? Are there a large number of message in those folders, or is your In Box extremely large? You may want to experiment with moving and storing messages to other folders from the In Box to keep it very small, and also to empty the Trash and shrink down the Sent folder. I have a theory which I have not proven yet that very large folders may get resorted or reshuffled when additional messages are added and this might make some email programs (like Apple Mail) do a lot of "work" with them, just because a few new messages have been added. So if you had 10,000 messages in your In Box, if you were file them into 20 other folders that you create (these folders can be set up by date span, or by topic, or by sender ...), maybe 50 messages per folder, you can still access them easily but your In Box will be kept very small and when something changes in it, Apple Mail will handle that quite quickly without downloading a lot of stuff.

Aug 21, 2021 7:17 PM in response to steve626

The problem is on a Yahoo Mail account, not Exchange. But you make a good point about the size of the Inbox and Sent, except that this just started happening in the last couple weeks, and those folders have been enormous for years. (Trash is supposed to delete anything older than 30 days, so that's probably not the problem.)


I'm also wondering what the ramifications will be if I decide to change the account from IMAP to POP. (I don't remember why on earth we made it IMAP to being with, because it definitely used to be POP, and this is the only device used to access that mail.)

Aug 21, 2021 7:50 PM in response to 100 Watt Walrus

One thing I'm not sure about. You said the account was once POP. My understanding is you can't convert an account from one type to another, and you would need to create a new account. Does the POP and IMAP account information reside separately? If they are somehow still connected, I'm not sure what would happen when the POP messages do not exist on the server (if it even checks). I have never tested with that situation.

Aug 22, 2021 1:14 AM in response to Barney-15E

It's been forever since we switched to IMAP on this account, but I'm pretty sure it's just a matter of which protocol you use. If you use pop.mail.yahoo.com, the mail downloads to your computer and is removed from the server. If you use imap.mail.yahoo.com, a copy stays on the server, and everything you do gets synced.


In fact, now that I think about it, I have Mail.app set up to use IMAP on my own Yahoo Mail account, but only so I can try to recreate any issues my family member might have with his account. And I also have my Android set up to connect to Yahoo Mail via IMAP, because I only ever do that occasionally. Then when I actually check my email for real, my client of choice (Postbox) is set up to POP my Yahoo mail, because that's how I roll — old school and leaving no trace on the server.

Aug 23, 2021 3:06 PM in response to Barney-15E

Hi Barney-15E,


There's only one account. At some point (years ago), it was changed from POP to IMAP. Whatever the case, it's too late now. We already did the procedure you suggested above. The rebuild took about an hour, but it didn't do any good. As soon as Mail was back up from the rebuild, Mail's Activity window showed the same kind of thing, e.g. "Downloading Messages — 30 of 3,968."

Aug 21, 2021 4:23 PM in response to 100 Watt Walrus

P.S. One more thing -- if you were to decide to switch to Outlook for Exchange emails, you can use Outlook for all new Exchange emails and keep Mail as an simply a static storage for everything earlier. You would disable checking and downloading from that account for Apple Mail, since Outlook would be used for all new messages. All your existing emails would still be accessible in your Apple Mail, however. This would avoid the costly (bandwidth-wise) step of trying to "convert" from Apple Mail to Outlook mail (I'm not even sure that is even feasible).


By the way, Outlook offers an option to only download attachments if they are below a certain size. Larger attachments are kept on the server and are only downloaded when you tell it to. That also saves on bandwidth if you have tight constraints.

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.app constantly re-downloading hundreds of IMAP messages

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