Symptom
Trying to send mail through mailx,
echo “Testing mailx” | mailx -s “Testing 1 2 3” test@example.com
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.
Solution
Rename mailx configuration file from /etc/mail.rc to /etc/nail.rc
sudo mv /etc/mail.rc /etc/nail.rc
Troubleshooting
Mailx used to be called “nail” and it seems the global configuration file in /etc/ keeps the legacy naming.