- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: wrong IMAP search query, returns 0 messages for UNSEEN, ALL etc on many servers #1177
Comments
The RFC in question is: https://tools.ietf.org/html/rfc4731
In it, you can find the following example to illustrate the above rule:
I'll update MailKit to be explicit, but this is actually a bug in the mail servers (Exchange?) that failed to implement the specification correctly. |
@jstedfast Thanks for the workaround! Yeah, I know this is most definitely a server bug, but what can I say... Welcome to the wonderful world of email :( |
I've just uploaded a new 2.11.1 nuget package to nuget.org with the work-around |
True, which is why I try to work around server bugs if there aren't any flaming hula-hoops involved ;-) |
When connecting to many IMAP servers (mostly office365 and self-hosted Exchange) using MailKit - it returns zero messages when searching for
NotSeen
.When testing with another library we used before (LimiLabs) - everything works perfectly.
I decided to trace the IMAP commands for both libraries and this is what I see:
MailKit (fails):
Limilabs (works correctly)
As you can see, MailKit asks for
RETURN () UNSEEN
instead ofRETURN (ALL) UNSEEN
The worst part is I can't even search for
ALL
using MailKit b/c it asks forRETURN () ALL
which also fails (has to beRETURN (ALL)
).P.S. Please fix this so we could finally migrate to MailKit. Meanwhile we rolled everything back to LimiLabs.
The text was updated successfully, but these errors were encountered: