It seems this BUG is not fixed and it just happened to me last evening.
Mail App is downloading a numerous amount of emails (that don't exist!), they just appear in the activity window.
The logs are growing all the time, especially these 2 files:
2016-03-30_IMAPSyncActivity.log
2016-03-30_IMAPConnection-my_corporate_domain_here.com.log
The content, like in a loop with some values changing a bit:
Mar 30 00:18:46 Mail[484] <Debug>: [Oracle - F5388DAD-0469-461A-B433-9EAC88DA0B05 <4 chars>] Reset mailbox in sync state
Mar 30 00:18:46 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Sync> Created mailbox sync task with IMAPMailbox
Mar 30 00:18:46 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Body Fetch> Recalculated priorities - network: 0, persistence: 0
Mar 30 00:18:46 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Sync> Has no work (allow: 1, force: 0) for IMAPMailbox [exists: 14, unseen: 0, UID next: 24, UID validity: 21478065, highest modseq: 0] and local data [exists: 14, unseen: 0, UID next: 24, UID validity: 21478065, highest modseq: 0]
Mar 30 00:18:46 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Sync> Recalculated priorities - network: 0, persistence: 0
Mar 30 00:18:46 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Sync> Stopped using display count
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Body Fetch> Successfully fetched attachments: 18
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Body Fetch> Recalculated priorities - network: 0, persistence: 0
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Body Fetch> Operation finished: <IMAPSyncAttachmentsOperation:0x7ff883db61c0> 1 downloads
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Body Fetch> Recalculated priorities - network: 0, persistence: 0
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] <Body Fetch> Body fetch task finished
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 208E2E5C-CA1B-41DC-B781-7126393C1189 <22 chars>] <Body Fetch> Network operation: <IMAPSyncAttachmentsOperation:0x7ff888cb0550> 4 downloads, 0 messages with attachments left to fetch
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 208E2E5C-CA1B-41DC-B781-7126393C1189 <22 chars>] <Body Fetch> Recalculated priorities - network: 0, persistence: 0
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 208E2E5C-CA1B-41DC-B781-7126393C1189 <22 chars>] <Body Fetch> <IMAPSyncAttachmentsOperation:0x7ff888cb0550> 4 downloads now running
Mar 30 00:18:47 Mail[484] <Debug>: [Oracle - 03FB6C9C-1A24-4739-9269-9C32023B9CC8 <7 chars>] Reset mailbox in sync state
and the second log file:
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff8865d47d0:[Selected mailbox=FE75339F-92BF-46B1-A28D-D7AD8F9EEEA0 <6 chars>]> Read: * FETCH 8(<IMAPBodySectionFetchResult> UID 8)
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff8865d47d0:[Selected mailbox=FE75339F-92BF-46B1-A28D-D7AD8F9EEEA0 <6 chars>]> Read: 295.3 OK
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff8865d47d0:[Selected mailbox=FE75339F-92BF-46B1-A28D-D7AD8F9EEEA0 <6 chars>]> Wrote: 296.3 UID FETCH 8 BODY.PEEK[2]<1045483.31959>
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff88948d660:[Selected mailbox=F5388DAD-0469-461A-B433-9EAC88DA0B05 <4 chars>]> Read: * FETCH 3(<IMAPBodySectionFetchResult> UID 3)
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff88948d660:[Selected mailbox=F5388DAD-0469-461A-B433-9EAC88DA0B05 <4 chars>]> Read: 296.2 OK
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff88948d660:[Selected mailbox=F5388DAD-0469-461A-B433-9EAC88DA0B05 <4 chars>]> Wrote: 297.2 UID FETCH 3 BODY.PEEK[2]<659828.133223>
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff8865d47d0:[Selected mailbox=FE75339F-92BF-46B1-A28D-D7AD8F9EEEA0 <6 chars>]> Read: * FETCH 8(<IMAPBodySectionFetchResult> UID 8)
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff8865d47d0:[Selected mailbox=FE75339F-92BF-46B1-A28D-D7AD8F9EEEA0 <6 chars>]> Read: 296.3 OK
Mar 30 00:18:43 Mail[484] <Debug>: <0x7ff8865d47d0:[Selected mailbox=67991AEE-F6ED-4763-8296-52C9A023C0CC <26 chars>]> Wrote: 297.3 SELECT 67991AEE-F6ED-4763-8296-52C9A023C0CC <26 chars>
As you can see these files are filling up quite quick - few lines of text each second....
THIS IS A HUGE ISSUE and none of the methods that were mentioned here or in similar threads didn't resolve my issues.
Apple Mail is trying to download a huge number of e-mails (that don't exist) and fill in my disk drive with these logs mentioned above.
This is a nightmare, and it seems it's making me more furious than Outlook loosing my e-mails :-/
Please share any ideas you have to solve this.