Skip to content

Alert manager unable to send unsecured emails #1236

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

Open
orlmar opened this issue Feb 12, 2018 · 8 comments
Open

Alert manager unable to send unsecured emails #1236

orlmar opened this issue Feb 12, 2018 · 8 comments

Comments

@orlmar
Copy link

orlmar commented Feb 12, 2018

We just upgraded Alertmanager from version 0.9.1 to 0.13.0 and Prometheus from 1.8.1 to 2.1. The Alertmanager's email receiver doesn't work anymore with identical configuration.

In the log, we have an error:
msg="Notify attempt failed" attempt=10 integration=email err="*smtp.plainAuth failed: unencrypted connection"

Could it be related to this issue in net/smtp?
golang/go#22166

Th smtp related configuration is:

global:
smtp_smarthost: 'smtpserver:25'
smtp_from: 'user@domain'
smtp_auth_username: 'user'
smtp_requiere_tls: false
...
receivers:

  • name: 'emailreceiver'
    email_configs:
    • to: 'user@domain'
      headers:
      subject: 'testing'
      html: 'some body'

Also we tested requiere_tls parameter in email_configs section for the case it doesn't read the global parameter.

@stuartnelson3
Copy link
Contributor

The issue you linked says the fix for that regression was added to go1.9.2, which was used to compile v0.13.0.

@justlooks
Copy link

i have same problem

# ../bin/alertmanager --version
alertmanager, version 0.14.0 (branch: HEAD, revision: 30af4d051b37ce817ea7e35b56c57a0e2ec9dbb0)
  build user:       root@37b6a49ebba9
  build date:       20180213-08:16:42
  go version:       go1.9.2

@CadenOf
Copy link

CadenOf commented May 24, 2018

level=error ts=2018-05-23T16:22:43.848809749Z caller=dispatch.go:266 component=dispatcher msg="Notify forr="*smtp.plainAuth failed: unencrypted connection"

I have the same....

Dose anyone know how to fix this problem?

Alertmanager.yml

global:
smtp_smarthost: '.........com:25'
smtp_from: '.............'
smtp_auth_username: '...........'
smtp_auth_password: '..........'
smtp_require_tls: false

@brian-brazil , we need your help

@note
Copy link

note commented Jun 21, 2018

I also had this problem. This issue (golang/go#22166) suggest that it has been fixed in Go 1.10.x although I doubt it. I ran dockerized alertmanager 0.15.0-rc.3 which is built with go1.10.3 and I still have the same problem.

According to AcalephStorage/consul-alerts#208 Go SMTP lib does not support non-TLS connection against non-local servers.

@simonpasquier
Copy link
Member

As stated in the SMTP godoc, the library will allow plain authentication only if TLS is used or the server is local. So you'll have to fulfill one of the conditions to make it work. I'm afraid there's nothing much that can be done on the AlertManager's side.

@note
Copy link

note commented Jun 21, 2018

@simonpasquier That's understandable then but I would say that it would be nice to have it stated in the alertmanager's docs. If the application exposes smtp_require_tls and the documentation does not states that it's not effective (outside of localhost) then it's quite confusing for the user.

hh pushed a commit to ii/alertmanager that referenced this issue Feb 8, 2019
…s#1243)

* netclass_linux: remove varying labels from the 'up' metric

This moves the variable label values such as 'operstate' out of
the 'network_up' metric and into a separate metric called '_info'.
This allows the 'up' metric to remain continous over state changes.
Fixes prometheus#1236

Signed-off-by: Paul Gier <[email protected]>
@rschmitz87
Copy link

Bump. Running into the same issue, need answers.

@xkfen
Copy link

xkfen commented Mar 4, 2020

just change the global.smtp_require_tls from false to true

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

No branches or pull requests

8 participants