Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: 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?

share|improve this question
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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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