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

how to sendmail with non-anonymous user #355

Closed
jaminlai opened this issue May 20, 2016 · 3 comments
Closed

how to sendmail with non-anonymous user #355

jaminlai opened this issue May 20, 2016 · 3 comments

Comments

@jaminlai
Copy link

jaminlai commented May 20, 2016

hi, we want to notify message with alertmanager by send email.

however,the smtp server response 'Client was not authenticated', the detail tcp produce as below:

220 GD2-CAS01.corp.aaa.com Microsoft ESMTP MAIL Service ready at Fri, 20 May 2016 15:47:13 +0800
EHLO localhost
250-GD2-CAS01.corp.aaa.com Hello [10.xx.xx.xx]
250-SIZE 36700160
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-AUTH LOGIN
250-8BITMIME
250-BINARYMIME
250 CHUNKING
MAIL FROM:<san.zhang@aaa.com> BODY=8BITMIME
530 5.7.1 Client was not authenticated
QUIT

I think that the go connect smtp without carry the SMTP_AUTH_USERNAME and SMTP_AUTH_PASSWORD so take me as anonymous user

Here is the part of alertmanager.yml configure:

global:
  # The smarthost and SMTP sender used for mail notifications.
  smtp_smarthost: '192.xxx.xxx.xxx:25'
  smtp_from: 'san.zhang@aaa.com'
  smtp_auth_username: '****'
  smtp_auth_identity: '****'
  smtp_auth_password: '****'

and I have also set 2 environment variables:
SMTP_AUTH_USERNAME=xxx
SMTP_AUTH_PASSWORD=xxx

please help me ,thanks

@brian-brazil
Copy link
Contributor

http://www.robustperception.io/sending-email-with-the-alertmanager-via-gmail/ should put you down the right path.

@jaminlai
Copy link
Author

jaminlai commented May 23, 2016

@brian-brazil Thanks you very much.

I have change the another alertmanager edition by your suggestion, and so that it seems to pass auth success.

However, now caught another exception with:

WARN[1200] Notify attempt 2 failed: starttls failed: x509: cannot validate certificate for 192.168.xx.xx because it doesn't contain any IP SANs source=notify.go:193

Should I close the cls configure? How can I deal with it, it seems I can't change the alertmanager code if released.

Thanks you very much again!

@swerter
Copy link

swerter commented Aug 26, 2016

Hi jaminlai, this looks to me that you created the certificate by yourself, or you have a certificate for a fqdn but access it via an IP address. Maybe also have a look at this thread, seems to me pretty similar to your issue: elastic/logstash-forwarder#221. Hope that helps you further.

@grobie grobie closed this as completed Sep 1, 2016
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

No branches or pull requests

4 participants