El Capitan Mail - Checking for mail loop and crash
After updating to El Capitan, I am having an issue with Mail where it seems to be stuck in a loop checking for mail. Here is what is happing:
I have 5 IMAP email accounts (all Virgin Media, if that makes a difference) plus Gmail (also IMAP, I believe). If I disable all accounts except Gmail, everything is fine. If any of the Virgin Media accounts are active, "Checking for mail" appears in the status bar and the new message counter just keeps going up and up, until it is much higher than the total number of emails I have in all my mailboxes (I have approximately 45000 emails in total and the counter has got higher than 200000). Sometimes the counter resets and starts again at 0 new messages. This doesn't stop until I disable all the non-Gmail accounts. Genuine new emails do seem to be coming though but I sometimes need to restart Mail to get the unread counts to appear correctly. Sometimes the Mail application crashes when left running in the background for a while and I suspect that this may be related.
Has anybody else experienced this and does anybody have an idea about what I could try in order to resolve this?
iMac, OS X El Capitan (10.11)