The other day on my Mac I moved two old emails from a remote IMAP folder to the Inbox because I wanted to have them handy the next few days. They were promptly shown in the summary Inbox. Great. But this morning on my iPhone I notice that its Inbox now also showed two additional emails, but they were two different emails!
I should probably mention the two emails the iPhone showed were also from that same IMAP folder I moved the original messages from. But they were otherwise entirely unrelated (subject, date stamp, from, etc.). This is work mail so backend itâs all gmail that I access through IMAP. I started wondering if this was some kind of issue with some kind of indexing being done differently on iOS vs. OS X IMAPâŚ
Anyway, on my Mac I then proceeded to move the two emails from the Inbox back to that IMAP folder and sure enough not only did they get moved on my Mac, the other two emails in the iPhoneâs Inbox also moved back to that folder. Hmm, smells like indexing. At this point I figured Iâd try it again to see if this had just been some momentary glitch. So on my Mac I move the two messages from the IMAP folder to Inbox. They show up there just fine. But again on the iPhone I again had two different emails show up in Inbox. Fine, itâs reproducible.
At this point on the iPhone I navigated to that IMAP folder, and moved one of the two emails that I originally wanted to move to the Inbox. Sure enough, the iPhoneâs Inbox then correctly showed that email in the Inbox. But on the Mac Inbox, I now had that email displayed twice. On the Mac, I moved one of those copies from Inbox back to the IMAP folder. The Mac now shows one copy in Inbox and one in the folder. The iPhone shows one copy in Inbox and nothing in the folder.
What the heck?
Assuming, Iâve not gone prematurely senile over night, is there any rational explanation for whatâs going on here or is this just another weird manifestation of gmail + IMAP + iOS = no bueno?
Since this is Gmail on the back end, itâs worth looking in its Web interface to see whatâs really happening. Sounds like iOS Mail may have gotten the message IDs (not headers, just generic identifications) corrupted somewhere along the way and is having trouble letting go of those.
Indeed it appears gmail on the web is consistent with OS X Mail display. With one exception.
Gmail on the web shows that one email (as does iOS) in the IMAP folder once. My Macâs Mail OTOH sees two emails in that folder that at least to me appear identical. Now hereâs the real kicker. If on my Mac I move one of those emails to the Inbox everything works as expected. Gmail on the web and my iOS Mail then display the email in Inbox. However, if on my Mac I move the other one of those two identical emails to the Inbox, the Mac will display it just as expected in Inbox, but gmail will show another entirely unrelated email being moved from that folder to Inbox. iOS Mail is consistent with gmail web. The Mac will shows that message as still being in the IMAP folder.
If we assume that gmailâs web is the âmasterâ and always right, it appears itâs actually my HS Mail that has the issue.
To make matters worse, I see that gmail displays a message in that folder that I can also see on my iPhone. On my Mac, however, that email is nowhere to be found. Neither in that IMAP folder, nor in the gmail Archive that usually shows everything that ever came in. ???
Is there any simple way to have Mail re-index its message display so as to ensure it becomes entirely in sync with the âmasterâ? And if so, can I be sure in the process nothing gets lost. Right now Mac Mail sees at least one more message than gmail. That could be bogus, but can I be certain about that? And can that be generalized?
I have had to delete my Gmail account and re-establish it more times than I can count in order to get it to work reliably after an OS change or a change made by Google on their end. Apple and Google do work with each other to overcome Gmailâs unique approach, but the Mail app doesnât ever seem to automatically adapt to changes.
I donât have any answers here (in large part because I donât use Mail on other iOS or macOS), but remember that what look like folders in Gmail are really labels. Gmail is perfectly capable of allowing messages to have multiple labels, and thus appear in multiple places at once when viewed through an IMAP lens. IMAP support in Gmail was bolted on after the fact to meet the limitations of desktop mail clients for users who didnât want to use Gmailâs native Web interface, so itâs never going to be quite as tight as a true IMAP server.
Do not be surprised if messages go missing, or do strange things like this in the Mac and/or iOS apps when using gmail for the backend.
If you want reliable email and you use gmail, use the gmail app on iOS, and the web interface on your Mac. Or if you want to use the Apple apps, do not use gmail as your email provider.
They. Are. Not. Compatible.
They work perfectly together 99.5% of the time, but when they donât, you will tear your hair out. A very important email you were just reading will completely disappear. Filed emails will be the wrong ones, later on. You wonât have a record of the fact that you BCCd someone on an email. (That one is just a permanent incompatibility that I believe still exists. It can also be extremely important to know things like WHO you sent an email to.)