答案1
所以,我找到了解决方案。我必须将 /etc/munin/munin.conf 中的电子邮件设置从:
contacts me # may be unnecessary and cause warnings
contact.me.command mail -s "Munin notification ${var:host}" [email protected]
contact.me.always_send warning critical
到:
contacts me # may be unnecessary and cause warnings
contact.me.command mailx -r [email protected] -s "Munin notification ${var:host}" [email protected]
contact.me.always_send warning critical
因此,基本上,只需使用“mailx”代替“mail”,并在电子邮件主题前加上“-r[电子邮件保护]“
答案2
这是一个老问题,但它出现在 Google 中,我只是想做基本相同的事情(更改 Munin 通知发送者)。我能够使用以下方法做到这一点:
contacts me # may be unnecessary and cause warnings
contact.me.command mail -a "From: Munin <[email protected]>" -s "Munin notification ${var:host}" [email protected]
contact.me.always_send warning critical