Mailx: /usr/lib/sendmail: No such file or directory

By | August 30, 2016


Trying to send mail through mailx,

echo “Testing mailx” | mailx -s “Testing 1 2 3”

yields the following error:

/usr/lib/sendmail: No such file or directory "/home/username/dead.letter" 9/261 . . . message not sent.

Possible Cause

Name of mailx configuration file is set incorrectly.


Rename mailx configuration file from /etc/mail.rc to /etc/nail.rc

sudo mv /etc/mail.rc /etc/nail.rc


Mailx used to be called “nail” and it seems the global configuration file in /etc/ keeps the legacy naming.

Leave a Reply

Your email address will not be published.