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?

link|improve this question

57% accept rate
feedback

1 Answer

up vote 3 down vote accepted

When it says sh: mail: not found, it's telling you that it's trying to send mail using a command called mail, and you don't have it installed. Generally, this is a link to another program called mailx.

On CentOS/Fedora/RHEL:

yum -y install mailx

On Debian/Ubuntu:

aptitude install bsd-mailx
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.