Skip to content
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

v2:imapclient fetch message, parse FetchMessageBuffers error #659

Open
xiaoquanidea opened this issue Dec 10, 2024 · 5 comments
Open

v2:imapclient fetch message, parse FetchMessageBuffers error #659

xiaoquanidea opened this issue Dec 10, 2024 · 5 comments
Labels
client non-standard Interoperability with software violating the specs

Comments

@xiaoquanidea
Copy link

xiaoquanidea commented Dec 10, 2024

parse FetchMessageBuffers error,trace stack discovery is parsing BodyStructure error。

* 150 FETCH (UID 1733220355 INTERNALDATE "10-Dec-2024 15:11:12 +0800" FLAGS (\Seen) ENVELOPE ("Tue, 10 Dec 2024 10:49:37 +0800" "=?UTF-8?B?MjE1NDk3MzU1MCAtIE9PQ0wgQm9va2luZyBBY2tub3dsZWRnZW1lbnQgKCBTWlUgKQ==?=" ((NIL NIL "PLEASE-No-Reply-IRIS-4" "XXXX.COM")) ((NIL NIL "edith.test" "oocl.com")) NIL ((NIL NIL "OP-XXXX" "YYYY.COM")) NIL NIL NIL "<[email protected]>") BODY (("text" "html" ("charset" "UTF-8") NIL NIL "quoted-printable" 1224 16)("application" "octet-stream" ("name" "2154973550.pdf") NIL """" "base64" 65322) "MIXED") BODY[] {69100}

Error Prompt:

in response-data: in body-type-mpart: in body-type-1part: imapwire: expected atom, got "("

Error location:
image

@xiaoquanidea xiaoquanidea changed the title V2 imapclient fetch message, parse FetchMessageBuffers error v2:imapclient fetch message, parse FetchMessageBuffers error Dec 10, 2024
@emersion
Copy link
Owner

Sounds like a server bug. The body structure:

(
	("text" "html" ("charset" "UTF-8") NIL NIL "quoted-printable" 1224 16)
	("application" "octet-stream" ("name" "2154973550.pdf") NIL """" "base64" 65322)
	"MIXED"
)

The Content-Description is """" in the second part. Seems like the server doesn't escape quotes in the original header.

@emersion
Copy link
Owner

Which server gives you this reply?

@emersion emersion added non-standard Interoperability with software violating the specs client labels Dec 25, 2024
@xiaoquanidea
Copy link
Author

Which server gives you this reply

netease 163

@xiaoquanidea
Copy link
Author

Which server gives you this reply?

Do you need me to provide you with the original email?

@emersion
Copy link
Owner

That'd be interesting to check what the Content-Disposition is set to there and confirm the above comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client non-standard Interoperability with software violating the specs
Projects
None yet
Development

No branches or pull requests

2 participants