Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I press S in mutt, it saves the mail to a mail folder format (cur/ tmp/ new/), but I want a single file to be saved, just like how the attachment is saved, is that configurable?

share|improve this question
up vote 9 down vote accepted

The actual message shows up as an attachment as well, so you can save it from the attachment list. From either the index or the message itself, hit v to open the attachments and s to save

share|improve this answer
Just a note: if your email message contains attachments, then saving just the first entry from the attachments list will save the message - but without the attachments included inside. – sdaau May 19 '15 at 10:02
Another note: this doesn't save any headers, including sender, recipient and subject. – Sparhawk Oct 11 '15 at 3:35

The s command saves to a mailbox, which for you is in maildir format. Unfortunately, there is no save-to-file command, perhaps because in the historical mbox format, a mailbox that contains a single mail is just a file containing that mail.

The mutt command pipe-message (default shortcut |) can be used for this. It opens a command line and you write cat > DESIRED-FILE-PATH.

The "pipe-decode" option controls what happens to headers and mime parts when you save a message this way.

One could probably write a macro for this functionality.

share|improve this answer
Cool, this can save the headers as well, but for now, I'd use Michael's way, thanks! – warl0ck Jan 11 '13 at 1:56
This works well and provides an efficient manner of saving 50+ emails (using pattern-matching tagging) to file. I had to dig a little to find that by adding set pipe_decode=yes to my muttrc was what Kai von Fintel was writing about. – Screenack May 1 '15 at 13:36
also, this saves the attachments in the exported email file, as well. – sdaau May 19 '15 at 10:55

If you touch a file and then try to save or copy a message to it mutt will use it as a mbox.

Also you might want to use copy instead of save. Mutt assumes that a mail should only exist in one copy and saving a message to another mailbox will delete it from the first one, while copying will do a proper copy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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