mutt: save message to specific folder

tagged mails:

macro index S ":set confirmappend=no delete=yes\n<tag-prefix-cond><save-message>=archive\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n"

current only:

macro index A ":set confirmappend=no delete=yes\n<save-message>=archive\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n"

edit

macro index S ":set confirmappend=no delete=yes\n<tag-prefix><save-message>=archive\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n"

My fault, using tag-prefix instead of tag-prefix-cond, will apply the macro to tagged messages if present, else to the current selected.


The mutt guide has an example macro for your use case:

macro index <tag-prefix-cond><save-message>=foo<enter> "Save tagged messages (if any) to =foo"

You could implement it in your case like so:

macro index,pager A  "<save-message>=Mail/archive<enter>"  "mark message as Archived"

Hitting Shifta in either the index or pager view would save the message to your archive maildir.

Tags:

Mutt