-
Notifications
You must be signed in to change notification settings - Fork 346
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 Report — Runtime APIs Error: "In-Reply-To does not match original Message-ID" for MS Outlook emails #2536
Comments
I can confirm that prepending a line break to ms outlook message_id's fixes the issue, but it's still a bug. reply_msg.setHeader('In-Reply-To', `\n ${msg.headers.get('Message-ID')}\n`) // notice the \n |
Here is an example message-id that fails
This comes from the actual source of an email sent by ms outlook. It looks like there's some line folding that is happening. I'm guessing that on the cloudflare end of things, the string is being compared to the original message exactly. However, the I think the email specs allow folding but that the unfolded text should be treated as one line. |
Is there a fix for this yet? |
@edevil where should this be directed? |
To me. :) I'll create an internal ticket to track this. |
Hey @asimpletune, mind testing it again, please? |
Hey @edevil , just tested. The new issue is headers that are folded now are similarly rejected. Two problems with this: 1.) it doesn't conform to spec, as folding whitespace is supposed to be disregarded. I checked and that's now the case for one of my services. Here's a link to the rfc5322 spec. I also have a simple email parser that I wrote. While the code of that project is probably not helpful for this, what may be helpful is the grammar written in EBNF notation. Probably the simplest way to fix it is just remove any folding whitespace from both emails's headers (the original and the reply) and then do the check. |
Hey @asimpletune . Ok fair enough. We are now trimming both the message id header value of the original email, and the in-reply-to header value of the reply email. This way the values should match whether they are folded, have surrounding whitespace, etc. |
Send an email to a CF worker from a MS outlook client and try to reply using the email's Message-ID. This happens with the exact same code from the docs, and then you'll find the following error:
The text was updated successfully, but these errors were encountered: