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

Can't parse email where Message-ID has more than one "@" character #154

Open
gsiehien opened this issue May 19, 2022 · 2 comments
Open

Can't parse email where Message-ID has more than one "@" character #154

gsiehien opened this issue May 19, 2022 · 2 comments

Comments

@gsiehien
Copy link

Hi!

I've noticed that if Message-ID (or any other header using msg-id) has more than one "@" character than parsing via parseMsgID() from header.go fails with:

missing '>' in msg-id

as it expects to consume() special chars in the fallowing order: < , @ , >

i.e.

Message-ID: <113c01d86b4a$53bb4230$fa9e45a$@appmanager@yahoo.com>

I'm not sure if using two or more "@" characters in msg-id is correct but I've already seen a few of this headers in the wild.

@jugendhacker
Copy link
Contributor

According to https://www.rfc-editor.org/rfc/rfc5322.html#section-3.6.4 having more than one @ inside the msg-id isn't standard compliant and I would recommend fixing the broken implementation instead of accepting non standard stuff in this lib here.

@mooijtech
Copy link

For future reference, it's possible to call Text("Message-Id") from mail.Header instead of MessageID to not enter the parseMsgID function.

Microsoft not following specs/RFC as usual it seems:
https://community.mailcow.email/d/701-multiple-at-in-message-id/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants