I use nullmailer to forward root's mail to a smarthost.
When mail to root from mdadm reaches my inbox, syslog looks like this:
nullmailer[1502]: Trigger pulled.
nullmailer[1502]: Rescanning queue.
nullmailer[1502]: Starting delivery: protocol: smtp host: sub.domain.com file: 1289568895.4704
nullmailer[4706]: smtp: Succeeded: 250 2.0.0 Ok: queued as 36A595E4384
nullmailer[1502]: Sent file.
nullmailer[1502]: Delivery complete, 0 message(s) remain.
--
When mail to root from smartd fails, syslog looks like this:
smartd[4717]: Executing test of mail to root ...
smartd[4717]: Test of mail to root produced unexpected output (20 bytes) to STDOUT/STDERR: #012sh: mail: not found#012
smartd[4717]: Test of mail to root: failed (32-bit/8-bit exit status: 32512/127)
What's smartd doing differently?
When it says
sh: mail: not found
, it's telling you that it's trying to send mail using a command calledmail
, and you don't have it installed. Generally, this is a link to another program calledmailx
.On CentOS/Fedora/RHEL:
On Debian/Ubuntu: