mdadm可以发送邮件,但smartd不能

我使用nullmailer将根邮件转发到智能主机。

当从mdadm发送邮件到达我的收件箱时,syslog看起来像这样:

nullmailer [1502]:触发器被拉。

nullmailer [1502]:重新扫描队列。

nullmailer [1502]:开始投递:协议:smtp主机:sub.domain.com文件:1289568895.4704

nullmailer [4706]:smtp:成功:250 2.0.0确定:排队为36A595E4384

nullmailer [1502]:发送文件。

nullmailer [1502]:传递完成,留下0个消息。

当从smartd发出的邮件失败时,系统日志如下所示:

smartd [4717]:执行邮件testing的根…

smartd [4717]:testing邮件到root用户产生意外的输出(20字节)到STDOUT / STDERR:#012sh:mail:not found#012

smartd [4717]:邮件testing根目录:失败(32位/ 8位退出状态:32512/127)

有什么不同的做法?

当它说sh: mail: not found ,它告诉你它试图使用一个叫做mail的命令mail ,而你没有安装它。 通常,这是另一个名为mailx程序的链接。

在CentOS / Fedora / RHEL上:

 yum -y install mailx 

在Debian / Ubuntu上:

 aptitude install bsd-mailx