3

I've recently migrated my email from Google Apps to the free version of Google - however my iPad and iPhone mail apps are ordering my emails in some completely illogical order.

enter image description here

At the top I have new unread emails, then I have emails from October 2013 which then goes backwards down to 2011. Somewhere scattered in those messages are the emails from November 2013 to today.

Other email clients (both on iOS, Windows and the web) don't have this issue, so how can I resolve this?

More details

I can temporarily resolve this if I scroll down to the very bottom of the emails (so loading them all) and then return to the top. At which point all my emails are displayed in the correct date order.

However overnight iOS (presumably) flushes the bottom emails from memory and in the morning I'm back to seeing unread emails at the top followed by the ones from 2013. The ones that I've previously read are now buried somewhere in the list.

  • Clients that don't have this issue: Gmail (web), GMail (iOS app), Outlook (Windows), Windows 10 mail (Windows) and Thunderbird (Windows).
  • Clients that do have this issue: iOS Mail for iPad, iOS Mail for iPhone.

I've tried importing my emails between Google accounts in multiple ways, none of which have made any difference to the iOS Mail clients:

  1. Getting the new Gmail account to pull emails via POP3 from the old email account
  2. Using Thunderbird to link both old and new accounts and then transfer the emails between the two via IMAP
  3. Same as #2, but using a local folder as an intermediary - as suggested by this answer.

Bizarrely, when I did #2 for "Sent Items", iOS Mail presents them in the correct order!

Finally, this has nothing to do with threading of emails. I've tried turning that on and off and it makes no difference.

Does anyone know how I can fix this?

2
  • 1
    This is the sort of thing that would get an answer from Apple Support pretty quickly. I'm wondering, if it's not sorting by date, have you figured out what exactly it is sorting by? – Matt Sephton Jul 15 '18 at 16:05
  • @MattSephton I've absolutely no idea. I even looked in the Google Takeout mbox export to see if the order of that was broken or if it was being sorted on a Delivery-Date or similar field - but nothing. – Richard Jul 17 '18 at 21:42
3

Not sure if anyone will still read this but this question was still pretty high in rank on Google search.

I'm moving a large amount of mails from Gmail to self hosted solution, and also noticed this issue. I believe this is not caused by "Apple isn't looking at the same date for sorting that webmail or Outlook uses", rather it's because how the app interacts with IMAP servers.

In IMAP servers, all messages in a specific folder has a unique identifier (UID, see RFC 3501 for more technical details). It's a monotonic increasing number, and the UID is assigned to each mail in the order of it's addition to the mailbox in most cases.

The issue is when migrating emails, sometimes it's not guaranteed that the old mails are inserted in chronological order, so they may be partially "out of order" in terms of UID (in my case, the new mailbox is already receiving new mails when old mails are still being imported by imapsync).

My best guess is iOS mail app is only fetching tailing UID range of a folder, and in a normal mailbox it's just fetching the latest mails. However, in the above situation, it may gets mails that could be very old, but for all mails it's already fetched they will be in right chronological order. The time gap is simply because the app didn't actually have those mails downloaded. When you load more mails, the "missing" mails will be eventually downloaded and shown in right order. (I should have verified this by sniffing but didn't, but this should be the most possible explanation.)

The reason Outlook was fine in @Rick Rothwell's case may be that Outlook actually stores all mail headers locally (IIRC) so it can just reorder the mails locally to show them in chronological order. I've checked Roundcube's source code and it uses IMAP SORT command when fetching mails. However that command supposedly is not supported by some servers, and that could be why iOS mail app was not using it.

To fix the issue, I think the most direct approach is to just move the mails to another temp folder then move them back, while making sure that the moving operation is applied in chronological order (older ones first). As the UID of the mails are tracked per-folder, moving them across folders would give them new UIDs, and by making sure that they are assigned UID in right order there would be no issues in iOS mail app (or any other client that has this issue).

1
  • That makes a lot of sense. In the end I just left the emails in the wrong order and the new ones gradually pushed down the unordered ones to the point that it wasn’t much of an issue any more. – Richard Sep 25 '20 at 18:27
2

The problem is that Apple isn't looking at the same date for sorting that webmail or Outlook uses. I just had a mess cleaning up a user's mailbox that was full at 25GB. Our Rackspace webmail only lets you move 100 items at a time, so I used Outlook so I could grab huge chunks of email to move. Oops !

It did a pretty good job with over 120,000 emails in the mailbox, but eventually the number of items was off. Then I used webmail to move the rest that were orphaned. Looks fine in Outlook 2016 (Office365) and in Rackspace webmail. But on an iPhone or iPad the first week of email was right, then it went to 2016 emails - 2017 and 2018 were no longer where they should be. Messed up, not in correct chronological order.

The solution that a Rackspace tech gave me was via webmail - not Outlook or other device - to move the emails in the Inbox to another folder for 5+ minutes, let everything sync on the server, then copy them back to the Inbox. It fixed all the emails I tried it on. There's 71,000+ in her Inbox, so if having the last few weeks correct on the iPhone is all she needs, I'm done ! I was very happy that a simple move out and back fixed the issue. Hope it helps someone else. There is also the option of using the Outlook app, it may not be affected by the Apple iOS date issue.

1

I know this is old but I just had this happen to me on iOS 13. I was trying to mark all email as read and slipped and marked everything as junk... After correcting that nightmare, I noticed my email showing on my phone was very old. I read the solution here about restoring the phone from the backup and I did not want to do that. So the solution I came up with was this and it worked for me.

  1. Log in to your Gmail account online through a browser and select all email in your inbox. Then Chose Archive. This moves all mail out of the Inbox for Gmail but leaves it in the All mail folder.
  2. Go to the All Mail Folder and select the email you want to be back in your inbox. For me I selected the last 100 emails and then chose Move to Inbox.
  3. Drag down on your iPhone to refresh the mail. All your mail that you moved back to the inbox should now be in there in order.

Enjoy....

0

I had exactly the same Problem with my iPad, deleting the account and adding it again didn't solve the Problem so I Spoke with someone at the Genius Bar.

Just Backup your data and reset your device. After that just restore from Backup. That solved the Problem for me.

Hope I could help you.

2
  • Didn't work I'm afraid, the emails just re-appeared in the same (wrong) order. – Richard Jul 19 '18 at 15:13
  • Well I'm sorry that I haven't helped you. have you tried to contact Apple Support? – Fabian Gr Jul 20 '18 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .