Where does Mutt save attachment?

By default, mutt saves attachments to whatever the current directory was when you started mutt.

If you want to save to a particular directory, cd to that directory before starting mutt:

cd mypreferreddirectory
mutt

mutt also allows you to define many powerful macros. To define a macro "W" for saving to a particular directory, put the following in your ~/.muttrc file:

macro attach W <save-entry><kill-line>/home/gawron/attachments/ 

For more on this, see the mutt FAQ.


After you hit s and before you hit Enter, mutt proposes a default file name (which is the original name of the attachment). At this point, you can provide mutt with a new directory (and with a different file name).

So if mutt proposes attach.ment, just fill in the path you need the file saved to, ~/your/desired/folder/attach.ment and hit Enter.

If you want to save attachments always in the same folder, John1024 describes how to do it.


There's no config option (AFAIK) but here's a simple work around.

The following alias will save your files into an "attachments" folder in your home directory:

alias mutt='cd $HOME/attachments;/usr/bin/mutt;cd -'

Add it to your .bashrc or .bash_profile.

Tags:

Mutt