新環境上配置alertmanager時出現了「Client was not authenticated to send anonymous mail during MAIL FROM」錯誤,但老環境上是好的spa
使用以下方法來驗證郵件發送:.net
alertmanager的郵件配置以下:調試
global: resolve_timeout: 5m smtp_smarthost: '10.10.10.1:25' smtp_from: 'prometheus@example.com'
EHLO example.com
MAIL FROM:prometheus@example.com
RCPT TO:MYEMAIL@example.com
DATA
Subject:test message
This is an email test
PS:本環境問題最終定位是因爲防火牆沒有添加郵件白名單所致 code
參考:blog