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 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.

Jul 12, 2016 3:59 PM in response to mo_man

Update to my previous post. changing the port values and setting the SSL option did not fix my problem. I called verizon to see if they had installed any updates/changes to their server and they said no. So, the only other thing had changed since the this problem started was the action of receiving new emails. I keep all my emails on the server, so I went to Verizon,s webmail server and saw that there were 5300+ emails on it. Started thinking that maybe Apple might have an issue/limit on the number of emails it can process. I deleted around 2000 old emails and my phone stopped constantly downloading emails every time I open the Mail App on my phone. Happy iPhone user again.

Jul 12, 2016 4:31 PM in response to mo_man

Glad you managed to resolve your situation. Unfortunately, that solution won't work for me, since I don't store my messages on the server. I have since discovered that the folder that keeps building up with copies of messages (/Users/LMHML/Library/Mail/V3/IMAP-LMHML@lm.deskmail.washington.edu) is completely independent of /Users/LMHML/Library/Mail/V3/Mailboxes, where the messages that actually appear in Mail are stored. I deleted the IMAP directory and changed my setup so that copies of my messages are left on the server (because everyone kept telling me deleting them was the problem). Nothing was damaged, but the deleted directory immediately reappeared and started storing multiple copies of newly downloaded messages again. So it seems the only obvious solutions are to stop using Mail or run a little script deleting the IMAP directory every day. ;*) Interestingly, the IMAP directory contains the same mailbox structure as is defined on the server.

Jul 12, 2016 10:20 PM in response to yairz

A computer managed by an email account provider that acts as a digital post office and allows the transfer of email messages from sender to recipient. Outgoing mail servers (often called SMTP servers) handle messages being sent. Incoming mail servers handle messages being received. For IMAP accounts (such as iCloud or Gmail), copies of messages are stored on incoming mail servers until they are deleted.

Jul 13, 2016 8:41 AM in response to LMHML

The reappearing and copying of message in the directory IMAP-LMHML... is normal behaviour. Even if you keep the messages on the server, Mail makes a directory where it keeps a local copy of all mails. This copy stays synchronised with the server; if you add a new / delete an old mail in a folder on the server it gets added / deleted in the local directory. If you wonder what the advantage is of keeping the emails in the server, it is that you can see them from any device. (Other mail clients do the same.) Downloading multiple copies of those emails to the local IMAP-LMHML directory is, however, not normal. Do you see all those multiple copies appearing in the local directory, or is it that you see in the activity window that Mail is constantly downloading emails? If it is the latter, I suspect you have one (or more) corrupted emails in the server. At least that is what happened to me. It is not easy, though, to figure out which one(s)!

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.