I have a job scheduled by cron
running every day, and the job is about compressing a folder using tar
; and I found that the standard output of tar
keeps getting written into ~/dead.letter
everyday. The content that gets written is just the list of the files that got compressed, just like what you'll see on the command line when running tar
manually.
Searching dead.letter
shows that it's something related to a partial letter that got interrupted before being sent successfully. I do have a shell script running as daemon that monitors something on the machine and sending out email on specific conditions. The daemon is started using the following command:
setsid ~/send_mail_on_certain_event.sh >~/sendmail.log 2>&1 < /dev/null &
This is the only place that I use mail
(actually using ssmtp
) on the machine, and it's working as I expected (I got the email I wanted). I don't know if it has anything to do with the cron
job's output getting written to dead.letter
.