首先,我在服务器上配置postfix null-client。我配置了Alertmanager,它可以成功发送邮件:
notification_config {
name: "alert_test"
email_config {
email: "abc@gmail.com"
}
}
aggregation_rule {
repeat_rate_seconds: 3600
notification_config_name: "alert_test"
}和run命令:
./alertmanager -notification.smtp.smarthost :25 -config.file alertmanager.conf它会显示以下通知:
ERRO[0002] Error sending email notification: starttls failed: tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config file=notifier.go line=758你能帮我修一下吗?
发布于 2017-08-09 11:16:02
看起来您遇到了X.509验证问题。
禁用TLS要求,即turned on by default。
# The default SMTP TLS requirement.
[ smtp_require_tls: <bool> | default = true ]发布于 2015-12-11 13:00:46
在配置Postfix null-client并拥有帐户root@abc.com之后,我使用此帐户成功发送邮件。当我与警报管理器prometheus一起使用时,并使用命令:
./alertmanager -notification.smtp.smarthost 127.0.0.1:25 -config.file alertmanager.conf我没有收到邮件提醒,但它有通知:
> ERRO[0001] Error sending email notification: starttls failed: x509:cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs file=notifier.go line=761如何修复错误,谢谢!
发布于 2015-12-10 23:13:46
尝试将-notification.smtp.smarthost标志设置为localhost:25。在这种情况下,不会推断主机名。
https://stackoverflow.com/questions/34200179
复制相似问题