attachment

Forward Message With Attachments in Mutt

Problem: Forward attachment in mutt is hard This is a pain for every mutt user. I got a solution which can satisfy my need. Solution Add these two lines to your .muttrc. This will forward an email with the text self. unset mime_forward set mime_forward_rest=yes Add the following line to your .vimrc too. This will tag all attachments but the first one may not include, which depend on the number of attachments.

Save Attachments to Special Folder in Mutt

Problem: How to save attachments in mutt? No built-in solution for save multiple attachments to special folder in mutt. I spent couple hours to develop a workflow for doing this. Solution In muttrc: macro attach s "<shell-escape>~/.config/mutt/bin/saveattach.sh\n:source /tmp/from\ns" "Save attachment to specific folder" macro attach S "<shell-escape>~/.config/mutt/bin/saveattach.sh\n:source /tmp/from\ns" "Save attachment to specific folder" Shell script in ~/.config/mutt/bin/saveattach.sh #!/bin/bash if [[ -e /tmp/from ]]; then rm /tmp/from fi echo $HOME"//" > /tmp/from nvim "+normal G$" +startinsert /tmp/from path=`cat /tmp/from` echo $path if [[ !