|
@@ -1,6 +1,7 @@
|
1
|
1
|
package main
|
2
|
2
|
|
3
|
3
|
import (
|
|
4
|
+ "crypto/tls"
|
4
|
5
|
"flag"
|
5
|
6
|
|
6
|
7
|
"metrics-alerting/alert"
|
|
@@ -51,6 +52,11 @@ func main() {
|
51
|
52
|
cfg.Mail.SMTP.Host, cfg.Mail.SMTP.Port, cfg.Mail.SMTP.Username,
|
52
|
53
|
cfg.Mail.SMTP.Password,
|
53
|
54
|
)
|
|
55
|
+
|
|
56
|
+ // Skip verification for localhost
|
|
57
|
+ if cfg.Mail.SMTP.Host == "127.0.0.1" {
|
|
58
|
+ alerter.Dialer.TLSConfig = &tls.Config{InsecureSkipVerify: true}
|
|
59
|
+ }
|
54
|
60
|
}
|
55
|
61
|
|
56
|
62
|
if err := process.Process(client, script, alerter); err != nil {
|