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

Ignore trailing newline in smtp_auth_password_file #3549

Closed
giorgiga opened this issue Oct 7, 2023 · 1 comment · Fixed by #3680
Closed

Ignore trailing newline in smtp_auth_password_file #3549

giorgiga opened this issue Oct 7, 2023 · 1 comment · Fixed by #3680

Comments

@giorgiga
Copy link
Contributor

giorgiga commented Oct 7, 2023

For what I've seen, most systems ignore a trailing newline in password files, but alertmanger does not.

Since there is no way an smtp password ends in \n, the failure mode is a cryptic smtp auth failure, and alertmanager's behaviour is unique in this, it is a frustrating issue to debug.

I think it would be an improvement if alertmanager ignored trailing newlines when reading smtp_auth_password_file.

@alexander-zimmermann
Copy link

I agree. The POSIX standard requires a trailing newline character on every line of a text file. See https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html.

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 a pull request may close this issue.

2 participants