-
-
Notifications
You must be signed in to change notification settings - Fork 828
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
Syntax error in BODYSTRUCTURE. Unexpected token: '(' #1393
Comments
Sorry, forgot to add exception stacktrace:
|
What IMAP server is this? Can you paste the first line of the log ("* OK ... IMAP server ready")? I might want to enable a QuirksMode for this server. |
|
However I do not have access to this server. Its a client which is using our software and has email integration enabled. |
This comment is as much for myself as you or anyone else reading this.
Of that, this is what is causing the problem:
MailKit was trying to parse that as a Syntax:
The issue here is that the way What the IMAP server should probably do is this: Anyway, I've worked around the issue for now. I might have to re-think some of the parser code to handle this (but mostly other cases) cleaner, but for now, the work-around should work and I have added this to my unit tests to avoid breaking this scenario in case I do take a stab at re-working the BODYSTRUCTURE parser. |
Related to the bug fix for issue #1393
Hah! Turns out MailKit's own BodyPart.ToString() method uses NIL for an empty list of multipart children as well. And taking a closer look at the specs, doing I think that Dovecot is probably doing the only sane thing it can do in this case. |
Okay, redid the BODYSTRUCTURE parser to make it a tad cleaner for this scenario. |
That's an amazing quick fix! |
I just pushed v3.3.0. I'd been planning to make a release today so your bug report made it just in time :) |
Hello,
I am getting one more issue with BODYSTRUCTURE parsing.
See similar errors:
Here is the server log which I am receiving (its pretty big, so I think I too the one which is actually causing the issue (also tried to deanonymize it without breaking it)
I am not expert in IMAP protocol, but seems to me that some brackets indeed are missing:
Any ideas, if this can be fixed, or maybe even message could be ignored somehow?
Maybe some rules can be loosened in some settings?
Using Dot Net Core 6.
Mailkit library: v3.2.0
The text was updated successfully, but these errors were encountered: