我使用centreon+nagios做监控,用调用插件的方式发告警邮件。
做简单配置后,用
echo 'content' | mail -s "Subject" test@qq.com
或者echo 'content' | mailx -s "Subject" test@qq.com
[iredmail@vipgift ~]$ echo "mail content" |mailx -v -s test a@qq.com
Resolving host mail.enpen.com . . . done.
Connecting to 202.96.xxx.74 . . . connected.
220 mail.enpen.com ESMTP Postfix
>>> EHLO vipgift
250-mail.enpen.com
250-PIPELINING
250-SIZE 104857600
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
>>> AUTH PLAIN
334
>>> AGJyaWdodABBYjEyMzQ1Ng==
535 5.7.8 Error: authentication failed:
smtp-server: 535 5.7.8 Error: authentication failed:
"/home/iredmail/dead.letter" 11/297
. . . message not sent.
显示认证失败,张大侠的回复是mail和mailx都不支持smtp auth。
那么,我要实现用公司的iredmail系统发送告警邮件,解决办法越简单越好,该怎么办?