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
Occasionally getting "550-5.7.1 Not RFC 5322 Compliant" errors with multiple recipients #70
Comments
Well that is very interesting! Nice find. I implemented this as is based on the protocol examples in As for the max line length I wouldn't be surprised if that is still technically the mandated limit, but implementations are now capable of handling longer lines without the spec being updated. I sent a test email with a Email Headers
It sounds like you were premature in calling your fix a kludge! Based on the above I would love to merge the changes - are you happy to open a PR? We should probably give Thanks for the fantastic write-up - exceptional! |
We use Mailtrap to test emails and we noticed this in a different way. For multiple |
Thanks for opening the pull request! -- it was going to take me a little while to get to it. |
Spoke too soon, this doesn't work, it fixes the DATA headers but barfs on RCPT. |
Thanks @pequalsnp and @jazzboME - top work! I shall cut a release now 👍 |
Our institution uses Google Workspace, and I send emails through a local smarthost that gets routed through Google's SMTP servers and for the last month or so I've started to get occasional downstream bounces from the google server with an error like:
Strangely it doesn't happen all the time, and sometimes I can just resend and it works (?!!) but I've been able to effectively eliminate it by changing how the To: headers are generated. I can't tell if some Google servers in the pool are "pickier" or after a certain number of emails, it gets flagged. The standard in 3.6.3 of RTF 5322 states:
and that is probably what we're hitting here: that they need to be comma separated and not multiple headers, even if (most?) SMTP servers don't care.
So right now I've made the following code change on my local fork and the error has disappeared for me for the last couple weeks:
mine.go
to
However, this is a bit of a quick kluge in that a) this may produce lines that exceed the 998 limit specified in RFC-5322 2.1.1, and b) I'm thinking we may have to do the same for CC and BCC (and Reply-To),
Anyway thoughts on the best way to approach this?
The text was updated successfully, but these errors were encountered: