Alertmanager: smtp use private CA certificate

Created on 24 May 2017  路  5Comments  路  Source: prometheus/alertmanager

Hi,

I want to enable tls for smtp in my local network, but seems there's no option to config the private smtp ca certificate, how can I do?

areusability componennotify kinenhancement prioritPmaybe

Most helpful comment

Same issue than @hiscal2015
We need to put our CA certificate as smtp client config, this is needed by our smtp server.

on the net/smtp Dial call, you can give a custom TLS config which can take the CA certificate

https://golang.org/pkg/crypto/tls/#Config
Is it possible to add config key here ?

All 5 comments

@hiscal2015 I am not quite sure what you mean here. Were you able to figure it out by yourself? If you need further documentation on how to configure Alertmanager, please see: https://prometheus.io/docs/alerting/configuration/ or give us more details.

Same issue than @hiscal2015
We need to put our CA certificate as smtp client config, this is needed by our smtp server.

on the net/smtp Dial call, you can give a custom TLS config which can take the CA certificate

https://golang.org/pkg/crypto/tls/#Config
Is it possible to add config key here ?

@miton18 are you suggesting something similar to https://github.com/prometheus/alertmanager/pull/1222 (_*: configure http client from config_) for e-mail giving you the option to configure TLSConfig?

If it allow us to set a custom TLSConfig on tls.Dial() call => Yes

Another thing, what can I do if I want to use TLS config on another port ? https://github.com/prometheus/alertmanager/blob/f4430381498c704bdfd3575219abbe31a6296044/notify/impl.go#L266

1528

Was this page helpful?
0 / 5 - 0 ratings