Mutt is a relatively difficult mail client to learn. However, as most if not all mutt users will tell you, once you’ve got the hang of it, no other mail client can come close to matching the efficiency and speed of command line mail (or any thing else in command line for the most part). I recently started using mutt myself and just can’t get over how efficient it is once you’ve got your configuration sorted out. Yesterday I easily cleaned out 800 emails in about five minutes using some very simple search terms (and no I didn’t just delete randomly 800 emails). Unlike the title of this post implies though, I am not amazing with mutt, but what I do know, however, can get me around very quickly. Here’s what I use nearly every day.
Mutt supports this neat thing called tagging. It’s basically the command line equivelant of multiselect (ctrl+click or shift+click).
To tag a message, move the cursor to it and hit the t key.
To tag a group of emails based on a pattern, for example "Change Requests", hit capital T. You will see at the bottom of your mutt window Tag messages matching:. Type your tag term, hit enter, and you should see several highlighted messages now.
Finally, to peform an action on all tagged messages, preceed the command letter (s for save/move, d for delete, N for new, etc) with a semicolon ( ; ). For instance, do delete all tagged messages, type ;d.
In mutt, you can do this really cool (though not novel in the slightest) thing wherein you filter the displayed messages by a regular expression. You don’t have to use a regular expression of course, but never the less it can be done.
To limit/filter the currently displayed emails, head over to a directory you want to get a better filtered look at and press the l key. You will see at the bottom of your mutt window 'Limit to messages matching: '. Type whatever you want to limit to.
Note here though that limit by default only searches mail meta data unless otherwise specified. This makes searches go much faster since most of the time you’re just cleaning up your inbox by subject, receivers, and date. If you do want to search the body of your emails, preceed your search term with ~B, and mutt will go the extra mile and search email bodies for you.