Mail constantly downloading messages

Hi all,


I've recently performed a clean install of OS X El Capitan on my mid 2102 Macbook Pro (Non Retina) and restored on to it my user folder and settings from before the installation (I was running the latest update of OS X Yosemite).

Since then, I have experienced an issue where Mail constantly lists in its activity that it's downloading messages.

The amount of message varies from time to time and would range between 1,000 to 100,000 messages.

This issue occurs several times every hour.

Obviously, I don't get more than a 1,000 messages every few minutes and the size of the files on my disk stays the same, so these are definitely the same messages Mail had already downloaded when I initially performed the account setup.


The reason this bothers me is that it slows down the performance of my Mac, especially when working in Mail (which is one of my top 3 apps in OS X).

In addition, it severely drains the battery.


I've seen several posts with no solution that helped me fixed the issue.

I tried to disable and enable the account and I've also tried to recreate the account.

I tried to follow the steps provided at http://www.needhelp4mac.com/2015/10/troubleshooting-apple-mail-in-os-x-10-11-el- capitan/ which I saw posted in a similar thread - Mail constantly downloading messages | How to reset Mail?

However, all of these steps did not solve my issue.

My account type is an Exchange account and I'm running the latest 10.11.1 update.


If anyone has any other idea of something I could try, please let me know.

Any help would be much appreciated.


Thanks,

Yair.

MacBook Pro, OS X El Capitan (10.11.1)

Posted on Nov 17, 2015 2:50 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 3, 2018 2:45 AM

This is a method which I used after reading it on another blog and it worked very well. You end up with some emails downloaded again but after you threw them away the problem does no longer exist


User uploaded file

Pimiento



abfackeln Jan 26, 2017 at 10:47 AM

1ST POST


I was able to fix this problem using a variation of the info suggested by @Dataless.

the file MessageUidsAlreadyDownloaded3 does exist, apparently, in the user/Library/Mail/V3/MailData folder, along with two other similarly named files MessageUidsAlreadyDownloaded3-shm and MessageUidsAlreadyDownloaded3-wal

i deleted all three just to be sure.

i restarted mail and this time it had many more mails to download but they all seemed to count off without problems -- and i no longer have the downloading message.

121 replies

Jun 26, 2016 2:32 AM in response to Warwick Teale

Thanks. Perhaps this solves the issue of the continuous downloading of messages, but it does not solve the problem of Mail using large amounts of CPU. I followed the steps, but Mail keeps using 200% CPU.


For the record:


I installed El Capitan in a fresh new partition from scratch. I did not migrate anything from my previous installations, I did not sign in to iCloud, and did not install any other software, just EC 10.11.5. I started up Mail, connected to a single IMAP account, and waited patiently for Mail to download 65000+ mails from that account. After that, each time I check for new mails Mail goes up to 200% CPU.


I did the same with Yosemite (fresh install on a new partition, no other software, etc.), and there Mail behaves normally. CPU goes up to ~20% for 1 or 2 seconds, and that's it.


Something **is** different (and possibly wrong) in Mail in EC. Other mail programs in EC (e.g. Airmail, Thunderbird, Postbox) do fine. It is just Mail in EC.

Jun 26, 2016 3:16 AM in response to yairz

It's very strange activity that thousands of mail are coming in inbox .

What about the settings if your are using IMAP account in mail preferences .ie port settings , in accounts > account information , mail box behaviours , advanced also in junk .


If we open mail app right click on inbox or click on triangle a window opens > click on info > the limit is 18.25 GB , is it exceeding .

Please post the settings .

Jun 26, 2016 3:18 AM in response to yairz

It's very strange activity that thousands of mail are coming in inbox .

What about the settings if your are using IMAP account in mail preferences .ie port settings , in accounts > account information , mail box behaviours , advanced also in junk .


If we open mail app right click on inbox or click on triangle a window opens > click on info > the limit is 18.25 GB , is it exceeding .

Please post the settings .

Jun 26, 2016 5:00 AM in response to appreciate

Thanks for your reaction.


If I connect to a new IMAP account, Mail in EC has to download **all** the messages on the server. I have 62000 mails in 490 folders (not all of them in the Inbox), and it takes a while to download them all the first time. There is nothing strange on that.


The account info says I'm using 10.85 GB. (The provider does not limit the space available to store emails, so that is not a problem.)


I store Drafts, Sent, and Trash on the server, and Junk locally. (But I tried several combinations, and the problem is the same.)


The port of the IMAP server is 993, SSL is ON. All IMAP settings are as indicated by the provider. (And I use the same settings in Yosemite, but do not have this problem there.)

Jun 26, 2016 5:18 AM in response to figante

It seems that many mails that are on server or in inbox are malicious thats why they are creating issue .

If you delete the IMAP account and create it once again & bring back all mail they will again corrupt the mail box .


Is it possible if you save all mails in V3 folder, keep them for a day or two and try to create a fresh IMAP account & don't transfer all mails again in IMAP account .

So that it can be verified that malicious mails that may have embedded contents ( unknowingly ) will not corrupt the fresh IMAP account .

Jun 26, 2016 5:20 AM in response to figante

It seems that many mails that are on server or in inbox are malicious thats why they are creating issue .

If you delete the IMAP account and create it once again & bring back all mail they will again corrupt the mail box .


Is it possible if you save all mails in V3 folder, keep them for a day or two and try to create a fresh IMAP account & don't transfer all mails again in IMAP account .

So that it can be verified that malicious mails that may have embedded contents ( unknowingly ) will not corrupt the fresh IMAP account .

Jun 26, 2016 10:27 PM in response to figante

Thanks for posting your results. To assist (at your discretion)

I would suggest you do these things :

  1. briefly enable email all EMAIL LOGGING (OSX Mail.app / Window / Connection Doctor / enable connection Logging) for 5 mins and (make sure you DISABLE after sample time)
    • examine the IMAP logs for stalled and RETRY activity - its quite straight forward to see.
    • make sure your IMAP CLIENT (OSx Mail.app) is not timing out to its IMAP server. - this is basic network diagnosis
    • the logs are usually in
      ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail
  2. examine the status of the IMAP servers for each of your mail accounts. This is very simple using the OSx mail.app
    • in the Mai.app / "Mailbox List" (aka side bar"), select the mail account
    • use right mount click and select "Get Account Info" from the contextual menu
    • is this seem very slow, this is likely but not exclusively these things:
      1. the IMAP server is service you request very slowly - bottleneck at other end?
      2. you UPSTREAM access to the particular email server is slow (use the usual OSx network command to see this)
      3. your email client's latency is onboard - possibly using stale of corrupt state information in your ~/library/mail or Library/Containers/com.apple.mail/Data/Library/Logs/Mail folders - simply delete these and start again .. (see my previous post on this)
      4. examine ~/library/Logs for mail.app symptom dumps - if so,this is highly likely to resolve to local state corrupt state data - just delate it. The ABEND mail symptom dump will have some pointer to the mail component that ABENDED.
      5. add other ideas here.....
  3. Mail.app OSx errors: you may review system Mail.app errors in /var/log/system.log - see whats there. Usually these are UI or network timeouts / bounces an a mashup of failures.... worth a look
  4. Lastly: LOCALISE a test: this is quite basic and will help EXCLUDE local errors from your OSX account.
    • create another "testemail" OSX account (local or local network account), and set up ONE of your email accounts. Test there.
    • If this test DOES NOT exhibit the symptoms you see, then amass your attention to your production OSX account's mail and work it from there, else
    • the rproblem is UPSTREAM then go back to STEP 2.

HTH,

Post your results for others to see.

Warwick

Hong Kong

Jun 26, 2016 10:42 PM in response to yairz

Open mail app > mail preferences > accounts > mail box behaviour > if the box : store sent messages on the server is checked please uncheck it .

Close the window & close the mail .

Verify it , once again open mail app do you see any duplicate items in sent mail box .


If they are gone check the box once again .


An apple article is there : Mail (Yosemite): Use a specific mailbox to store messages on an IMAP server

Jun 26, 2016 11:59 PM in response to Warwick Teale

Thanks for your suggestions. I had already looked into the log files long ago; I believe I explained several of this in another post here: High Mail CPU with El Capitan. The server responds quickly, so there is no time out issue.


What I did see in those logs before is that there is a big difference in the number of operations that Mail does on the server in EC compared to Yosemite. (If Mail in Yosemite does the same number of operations, those are not logged, but given the big difference in performance, I presume Yosemite does not do them.) The log file in EC has 70000 lines, whereas that of Yosemite for the same account has only 95 lines. The difference between the two is that in EC, for each folder in the server (and I have many!), mail does this kind of things (I x'd the server and folder names):


WROTE May 29 10:45:51.250 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:xxx.xxx.xxx.xx -- port:993 -- socket:0x7fd27bb0f2e0 -- thread:0x7fd27bd42070

5.17 SELECT XXX


READ May 29 10:45:51.258 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:xxx.xxx.xxx.xx -- port:993 -- socket:0x7fd27bb2f600 -- thread:0x7fd27a7f9260

* 1 FETCH (FLAGS (\Seen) UID 79)

* 2 FETCH (FLAGS (\Answered \Seen) UID 80)

* 3 FETCH (FLAGS (\Seen) UID 81)

* 4 FETCH (FLAGS (\Seen) UID 82)

* 5 FETCH (FLAGS (\Seen) UID 83)

* 6 FETCH (FLAGS (\Seen) UID 84)

* 7 FETCH (FLAGS (\Answered \Seen) UID 85)

* 8 FETCH (FLAGS (\Seen) UID 86)

* 9 FETCH (FLAGS (\Seen) UID 87)

* 10 FETCH (FLAGS (\Seen) UID 88)

* 11 FETCH (FLAGS (\Seen) UID 89)

* 12 FETCH (FLAGS (\Answered \Seen $NotJunk NotJunk) UID 90)

* 13 FETCH (FLAGS (\Answered \Seen) UID 91)

* 14 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 92)

* 15 FETCH (FLAGS (\Seen) UID 93)

* 16 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 94)

* 17 FETCH (FLAGS (\Seen) UID 95)

* 18 FETCH (FLAGS (\Seen) UID 96)

* 19 FETCH (FLAGS (\Seen) UID 97)

* 20 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 99)

* 21 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 100)

* 22 FETCH (FLAGS (\Seen) UID 101)

* 23 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 102)

* 24 FETCH (FLAGS (\Seen) UID 103)

* 25 FETCH (FLAGS (\Answered \Seen $NotJunk NotJunk) UID 104)

* 26 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 105)

* 27 FETCH (FLAGS (\Seen) UID 106)

* 28 FETCH (FLAGS (\Seen) UID 107)

* 29 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 108)

* 30 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 109)

* 31 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 110)

* 32 FETCH (FLAGS (\Seen $NotJunk NotJunk) UID 111)

25.5 OK Fetch completed.


whereas Mail in Yosemite only checks the INBOX folder.


And Mail in EC does this **every time** I check for new email. Before, when I had about 10 times more folders, Mail took about 10 times longer (at 200% CPU) to finish all these operations. Yosemite took the same time (and low CPU) regardless of the number of folders. Makes sense if EC checks all folders whereas Yosemite only INBOX.


I also did the test user thing, but the problem remains. As I wrote above, I even started all over again, with a fresh EC installation on a different disk partition (without doing anything except defining a user and starting Mail), and the problem persists.


In the fresh install I have no process running, except Mail (and the system processes).

Jun 27, 2016 5:20 AM in response to figante

Open activity monitor via spotlight > select running application that is crossing more than 70 % and quit it or force quit it ( click on cross sign that is on extreme corner of the window ) .The CPU percentage should come down after hours as some applications are running on the background .

an apple article for activity monitor is attached , you can read it thoroughly .

Use Activity Monitor on your Mac - Apple Support

Jun 27, 2016 8:06 AM in response to appreciate

Thanks for the links. As an advanced user I am aware of all this. Unfortunately none of the suggestions there are applicable in this case. E.g., if I had to quit any application that uses more than 70% CPU I would have to kill Mail **every** time it checks for new emails since it uses 200% **each** time. Not a very practical solution, , I am afraid. I have tried much more advanced workarounds (see the discussion on the other post I provided earlier), but unfortunately they did not solve the problem. Thanks anyway.


To be clear:


1. Mail uses 200% CPU in a freshly installed version of EC, on a freshly created user account, without migrating anything from my previous Mac, without installing **any** other software, and without connecting to iCloud.


2. This does **not** happen on a newly installed version of Yosemite using the same IMAP account and account settings.


3. Every other client I tried in EC appears to work fine. (They use less than 20% CPU for 1-2 sec, just as Mail in Yosemite does.)


4. The log files in EC show enormous activity which Yosemite does not show. It appears that Mail in EC checks **every** folder **each** time it checks for new emails, whereas the IMAP protocol is to check only INBOX. Yosemite does not appear to do the same (from the log files and CPU usage).


I strongly suspect that this is a problem in the code of Mail in EC.

Jun 28, 2016 7:52 PM in response to yairz

I was having this similar problem on my iPhone where the mail would keep downloading sometimes 50 sometimes 100 emails every time i opened the mail application. In my case I was using Verizon Mail. A year ago they sent out new port number values for their incoming and outgoing servers. I had changed them, but when i went to verify my current settings I noticed that the old port values were there. I changed them back to the correct new values and also selected SSL (which they had specified) and so far it looks like the frustrating re-downloading of emails has stopped. Just another item to check out for anyone else that is experiencing this pain in the *** issue.

Good Luck.......

Jul 6, 2016 6:41 PM in response to mo_man

I am also having a similar problem, and also since switching to El Capitan. I don't have a CPU issue even though Mail seems to be downloading all the time. The real problem is that the Users/me/Library/Mail directory is now using over 150 GB -- yes, GB!! -- of space on my hard drive. I traced the bloat through many layers of directories. When I got to the actual messages (*emlx files), I found an example where two messages had each been stored 14 (yes, fourteen) times. One of the messages included two PDFs. This message was not always complete. The other one was just text and the 14 copies are identical. What is the issue? Thank you Apple for screwing up an app that worked fine for me for the previous 13 years!


I also don't use iCloud.

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 constantly downloading messages

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