Mailkit: UniqueIds returned by the Mailfolder.Sort are always sorted in ascending order

Created on 18 Dec 2018  路  2Comments  路  Source: jstedfast/MailKit

Describe the bug
The uniqueIds returned by the Mailfolder.Sort are always sorted in ascending order and not in the order they were sent by the server.

To Reproduce
Use mailfolder.Sort to get the sorted Uid list:

var uniqueIds = mailfolder.Sort(SearchQuery.All, new List<OrderBy> { OrderBy.ReverseDate });

Expected behavior
Uids should be in the same order as they were sent by the imap server.

Imap log:

C: A00000006 UID SORT (REVERSE DATE) US-ASCII ALL
S: * SORT 13 12 11 10 9 8 7 6 5 4 3 1
S: A00000006 OK UID SORT completed

The sort order is set in the method ImapFolder.Search.SearchMatchesAsync. Maybe it should be set to none if the UntaggedHandlers has a key like "SORT"?

bug

Most helpful comment

I'll try to make a new release either late December (week or so after Christmas) or sometime in early January. I probably won't have time until then to make a release.

All 2 comments

You are correct. Thanks for the bug report!

I'll try to make a new release either late December (week or so after Christmas) or sometime in early January. I probably won't have time until then to make a release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rhagh picture rhagh  路  5Comments

syneex picture syneex  路  4Comments

ghost picture ghost  路  3Comments

wayneguow picture wayneguow  路  5Comments

rgmills picture rgmills  路  6Comments