1

I was in the middle of writing an email when my computer shut down. I had already :w saved it, but not :wq saved-to-drafts.

Where should I look for the partial email? This is on Ubuntu Linux.

3

Mutt's message drafts reside in the temporary directory (\tmp), and are named as mutt-<hostname>-<unique-id>.

Note that many systems clean up the temp directory on system startup.

2

If you're using the default config, your messages are probably in /tmp (assuming that you haven't rebooted or otherwise cleaned up /tmp), but strictly speaking Mutt uses the following locations in order:

  1. the directory specified by the tmpdir variable in your ~/.muttrc
  2. if that's not set, the directory specified by the $TMPDIR environment variable
  3. if that's also not set, the /tmp directory

You may wish to set a tmpdir value in your ~/.muttrc precisely to help you recover emails you were writing at the time of a computer crash. Eg:

set tmpdir = ~/.mutt-tmp

Source: Mutt manual: tmpdir variable

1
  • Very helpful answer - thanks. Unfortunately, it also uses tmpdir as a staging area when saving your whole inbox. Since I tend to have a very large inbox, I want to set /tmp to a place that is automatically cleared out periodically, but I want drafts to be preserved. Perhaps mutt needs a way to set these two independently.... – nealmcb Sep 23 '16 at 17:35

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.