Trying to send mail through mailx,
echo “Testing mailx” | mailx -s “Testing 1 2 3” email@example.com
yields the following error:
/usr/lib/sendmail: No such file or directory "/home/username/dead.letter" 9/261 . . . message not sent.
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.