83

I find dead.letter files from time to time in my $HOME directory. What they are for?

2 Answers2

86

Either a program tried to send mail and failed (this is more likely), or you were in the middle of writing mail and broke out, so the client saved the draft in dead.letter. From the mail man page:

Normally, when you abort a message with two interrupt characters (usually control-C), mail copies the partial letter to the file dead.letter in your home directory.

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
  • 4
    Why its size is usually 0 bytes? – vs06 Jul 11 '14 at 13:54
  • @Micheal Mrozek can i do something like that dead.latter file will never generate, even program tried to send mail has failed ? – Girdhar Singh Rathore Aug 04 '15 at 16:11
  • 1
    @GirdharSinghRathore: According to the man page you can prevent this behaviour by adding the word/command nosave to the line starting with the set keyword in /etc/mail.rc. I have not tested this yet however. – ntninja Feb 05 '18 at 22:31
1

In my case it was an alert for my HDD death :'(.

It's still good to know what happened by reading the content of the file.

More info are available on the file it self.