Open Uni2K opened 3 years ago
Thx again for the detailed analysis!
@Uni2K , the GreenMail internal implementation holding messages is a list so the order should be the same. I also tried to reproduce using Thunderbird (mailbox with couple of messages 'unseen' and refreshing).
Can you provide the GreenMail verbose (eg via -Dgreenmail.verbose) output including the IMAP commands? Which client are you using?
Hello, its me again :D
I just found a new bug, here you can see a picture of it:
It was recorded in TB and shows that the numbers of unseen messages changes randomly. Moreover, also the total number of messages are displayed incorrectly, despite Greenmail holding the correct number of messages in the folder. The bug can be seen most dominant in Thunderbird but also in Outlook (it just does not show some messages).
The good news is that I already found the solution: The UIDs need to be sorted while returning the FETCH response to the client.
Example:
Wrong:
Correct:
So, all you have to do is to change the getMessageUids() method in the folder implementations to sort the uids before returning: something like:
And then everything will work fine :)