Saving email as file in mutt?

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.


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


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.

Tags:

Mutt