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

Use quoted-printable transfer encoding for the email notifier #1609

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

free
Copy link
Contributor

@free free commented Nov 7, 2018

Use quoted-printable transfer encoding for the text sent out by the email notifier.

Turns out MIME has a maximum line length of 998 bytes (RFC 2822, section 2.1.1) and some SMTP servers will enforce that by inserting a <CR><LF> after 998 characters, whether that's in the middle of a URL or HTML tag, potentially breaking the email's contents.

…out MIME has a maximum line length of 998 bytes and some SMTP servers will enforce that by inserting a newline after 998 characters, whether that's in the middle of a URL or HTML tag.

Signed-off-by: Alin Sinpalean <alin.sinpalean@gmail.com>
@free free force-pushed the fix-mime-line-length branch from 59dfa3f to 9513afb Compare November 7, 2018 11:47
@simonpasquier
Copy link
Member

LGTM. I suppose that you've tested it with a real SMTP server?

@free
Copy link
Contributor Author

free commented Nov 8, 2018

I suppose that you've tested it with a real SMTP server?

Yes I did, sorry for failing to mention that. I've been running an alertmanager with this change for a couple of days now. And I have seen a few alerts with lines longer than 998 characters displayed without corruption, so it works as expected.

@simonpasquier
Copy link
Member

Thanks a lot!

@mxinden mxinden merged commit 9426724 into prometheus:master Nov 14, 2018
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

Successfully merging this pull request may close these issues.

3 participants