0

When I do this

% mail -s "test" me@icloud.com < mail-text

it takes a few seconds, then it comes back with this error message:

/home/zach/dead.letter... Saved message in /home/zach/dead.letter

Still, the recipient (me, in this case) does receive the mail just fine. I am puzzled by this and would like to send the mail without the error message.

Also, I have just the same line in cron bash script, but I have not seen any error messages or dead.letter's from that. Any ideas, what might be the difference?

Another funny thing is that if I use mailx instead of mail, everything works just fine.

My Unix is: SunOS login 5.10 Generic_150401-06

Thanks a lot in advance for all kinds of insights or pointers.

PS: yes, I have already googled, but the only reasons for a dead.letter I have found is when mail could not finish sending, which it does in my case, apparently.

0

Have you looked at the mail log entries in /var/log/syslog? You should find lines with the words '... User unknown'

The default mail program does not accept -s "test" and therefor treats "test" as recipient. The dead.letter is saved for the non-mailable recipient called test. Try to add -t to the mail command to see "To: test" appearing in the dead.letter.

Finally omit -s "test" from your mail command to run it successful without creating/appending to the dead.letter file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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