IMAP: K9-Mail fetches old emails before recent ones

Hello everyone, I have a problem with K9-Mail (Android 16, OneUI 8.0, K9 Mail 18.0). When I set up my email account (IMAP), the app loads the oldest messages first. Since I have a very large number of emails, including very old ones (some dating back to 2014), the first 500 or even 1000 emails that appear are only these old messages, not the recent ones.

How can I make the app load the most recent emails first? That is, the emails from today first, then yesterday, then the day before, and so on until the limit for displayed emails is reached?

As it is now, the app is completely useless for me. I did not have this problem when setting up the app in the past.

For example, I have already tried moving all emails to another (new) folder via the web interface of my mail account. I also tried setting the sort order to “newest first” before fetching emails. Nothing helps. The app still loads emails from 2014 first :frowning:

Thanks a lot!

PS: I also tried the Thunderbird App. Same behavior. :frowning:

You can set the app to fetch only emails received within the last year, or one of the shorter intervals.

Goto settings > account name > fetching mail > ‘Sync messages from’

Hi @Zeroid, thank you for your reply.

I tried this option as per your recommendation, and it clearly highlights the issue.

When I enable syncing for only the past year, no messages appear, even though they are clearly present in the respective folder. When I switch to syncing all messages, some emails do appear - but as mentioned, the oldest ones show up first, which is not helpful.

I would really appreciate any further suggestions.

Thank you!

Does it work as you expect on other devices, e.g. a laptop or desktop computer?

The reason I ask is that the behaviour described can also originate in the server not having some of the IMAP extensions compiled or installed. Something like partial fetch with filters.

Hi @tchara, on my laptop I have Thunderbird installed, and everything appears as expected there, similar to the view on my email provider’s website.

Thank you!

I have some interesting updates. It seems the issue appears in relation to the amount of Mails I have in certain folders.

Here is what I did in detail:

Initial Setup:
FolderA: ~6000 Mails. From 31.12.2025 to somewhen in 2014

FolderB: 0 Mails.

Step1:

- Move first 200 Mails (sort by date), newest 31.12.2025 to FolderB with Thunderbird (PC app).

- Refresh FolderB in K-9 Mail app (Android)

:check_mark: Result: Everything is fine. I can see all messages in K-9 Mail.

Step2:

- Move next 200 Mails (sort by date), newest 02.11.2025 to FolderB with Thunderbird (PC app).

- Refresh FolderB in K-9 Mail app (Android)

:check_mark: Result: Everything is fine. I can see all messages in K-9 Mail.

Step3:

- Move next 200 Mails (sort by date), newest 14.10.2025 to FolderB with Thunderbird (PC app).

- Refresh FolderB in K-9 Mail app (Android)

:check_mark: Result: Everything is fine. I can see all messages in K-9 Mail.

Step4:

- Move next 200 Mails (sort by date), newest 05.08.2025 to FolderB with Thunderbird (PC app).

- Refresh FolderB in K-9 Mail app (Android)

:check_mark: Result: Everything is fine. I can see all messages in K-9 Mail.

Step5:

- Move next 200 Mails (sort by date), newest 17.05.2025 to FolderB with Thunderbird (PC app).

- Refresh FolderB in K-9 Mail app (Android)

:check_mark: Result: Everything is fine. I can see all messages (newer 1year) in K-9 Mail, as per setting.

Step6:

- Move next 200 Mails (sort by date), newest 04.03.2025 to FolderB with Thunderbird (PC app).

- Refresh FolderB in K-9 Mail app (Android)

:cross_mark::cross_mark::cross_mark: Result: Now the issue begins. The newest Mail I can see now in FolderB K-9 Mail app is not anymore from 31.12.2025 but from 17.11.2025.

Mails from 17.11.2025 to 31.12.2025 are not visible in K-9 Mail app anymore, but they are clearly there in Thunderbird (PC app) and the website of the mail provider.

Do you have the local folder size set to 1000 messages?
(Settings > Account > Fetching mail)

Seems too co-incidental that 1000 messages is where the downloads stop.

Note that > 500 messages is known to degrade performance.
Per the developers comments on github here

“The app’s performance slows down when many messages are downloaded. This is because it currently loads all messages into memory at once.”

“Performance begins to degrade noticeably once the message count exceeds 500’“.

“This is worse than tought, we need to improve the message handling. Propably database related, but the message list refactor could help too.”

Hi @Zeroid, the limit you mentioned is set to 500 at my app, but I used the “load more”-button (not clear how this is called in the english app version, I am using a different language) and then it loads more.
And yes, it seems it’s in the range of 1000 messages, but I’m not sure if exactly 1000. I can give it another try and go for smaller increments, when reaching ~1000 messages, to have a better insight when the trouble starts.