Alertmanger stopped working with smtp-relay.gmail.com smarthost

172 views
Skip to first unread message

Moritz Tanzer

unread,
Sep 29, 2020, 4:34:42 AM9/29/20
to Prometheus Users


Hi all!

I've been using the smtp-relay.gmail.com smarthost without authentictaion but it stopped working.
But I can send mails via local postfix using the gmail relay host, so the issue seems to be on the Alertmanager side.


Alertmanger log file:
receiver=email integration=email[0] msg="Notify attempt failed, will retry later" attempts=1 err="send EHLO command: EOF"
msg="Notify for alerts failed" num_alerts=1 err="email/email[0]: notify retry canceled after 6 attempts: send EHLO command: EOF"


My Alertmanager config:

global:
  smtp_smarthost: smtp-relay.gmail.com:587
  smtp_from: 'Alertmanager <alertmanager@XXX>'
  smtp_require_tls: true

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 24h
  receiver: 'email'


receivers:
  - name: 'email'
    email_configs:
    - to: 'XXX'
      send_resolved: true


    
Thanks in advance!

Brian Candler

unread,
Sep 29, 2020, 5:07:12 AM9/29/20
to Prometheus Users
Alertmanager version?

Try logging into the same host where alertmanager runs, and running the following:

openssl s_client -connect smtp-relay.gmail.com:587 -starttls smtp

See if you get an error like this:

550-5.7.0 Mail relay denied [<address>]. Invalid credentials for
550-5.7.0 relay for one of the domains in: mydomain.com (as obtained from HELO and
550-5.7.0 MAIL FROM).
550-5.7.0 Email is being sent from a domain or IP address which isn't registered
550-5.7.0 in your G Suite account. Please login to your G Suite account and
550-5.7.0 verify that your sending device IP address has been registered within
550-5.7.0 the G Suite SMTP Relay Settings. For more information, please visit

One possibility is that your host has gained a new external IP address (on IPv6 perhaps?) which has not been registered.

Moritz Tanzer

unread,
Sep 29, 2020, 5:14:53 AM9/29/20
to Prometheus Users
Thanks for your reply!

I tried it with version 0.19.0, 0.20.0 and 0.21.0

IP address is 100% correct configured in the Gsuite relay settings.
I can connect from command line as you mentioned and I can send mails from this host with local postfix using smtp-relay.gmail.com as relayhost.

Sandeep Rao Kokkirala

unread,
Sep 29, 2020, 5:40:49 AM9/29/20
to Prometheus Users
Try to login into Alertmanager pod and try if your able to resolve DNS from alertmanager pod?

Moritz Tanzer

unread,
Sep 29, 2020, 5:49:08 AM9/29/20
to Prometheus Users
Thanks for your input! DNS resolution works as expected.
Reply all
Reply to author
Forward
0 new messages