[ Update: I no longer use mutt. I switched to using a Linux desktop e-mail client. While at different points I have used Evolution, Kmail and Thunderbird, I'm currently using Claws Mail. mutt still comes in handy as a backup, although I use it so little I can't remember the keystrokes anymore. ]
Mutt is my preferred e-mail client. I think you might also like to try Mutt if:
I chose Mutt over the alternatives for a few reasons. First, I wanted to be able to check my e-mail from multiple computers using the same e-mail program. Because Mutt runs on a server, I'm always accessing the same problem with the same configurations and preferences.
I also wanted an e-mail program that was very responsive. I don't want to wait on my computer any more than I need to when managing my mail. I found that Kmail and Apple Mail both have nice GUIs, but just because they are graphical, they take longer for various operations than terminal-based alternatives such as Mutt.
Following the above thinking is how I ended up using Pine as my mail client. Yes, Pine. I used it for years and found it worked well for me. I began exploring Mutt after finding it to be the default the mail reader for the Debian GNU/Linux distribution. I ultimately found that Mutt has more features that I care about, and feels even more efficient to use. Read on for some of the Mutt features I find distinctive and useful.
limit
is a search feature that 'limits' the view of the current folder to those
messages that meet a specific criteria. The criteria is specified with Mutt's own regular expression language.
When I first encountered this,I thought "Oh no, another variation of the regular expression syntax to learn". I
pleased to find that Mutt's system was not only intuitive and consistent, it contains many email-specific
notations that add substantial value to the standard regular expression syntax. Here's an example I use. It means
"limit the view of my inbox to only mail that is either New, Flagged as important, or less than 7 days old":
~N|~F|~d<7d
limit
works great on a one folder, but there needs to be a way to search across
several folders. For this, the external grepm
program comes in very handy. It's an extremely thin
wrapper around the grepmail
utility. It allows you to search quickly through folders using regular
expressions, displaying the results as a temporary Mutt folder. The downside to being an external utility is that
it does not use Mutt's on syntax. Instead, it's a slightly modified version of the standard grep
syntax.
In practice, this has turned out not to be problem. Simple searches of the headers or body are easy enough
(try the -h
or -b
flags), and the rare complicated case sends me to the
grepmail
man page.
Still, I wanted a way to easily access addresses of people I have already e-mailed with. This is a feature I learned to appreciate from using Netscape Communicator. If I just started typing the name or e-mail address of a previous contact, the program would complete it even if I never formally added them to my address book.
Mutt can do much the same thing by integrating with the Little Brother Database, also known as
lbdb
. Here are the three steps to do that:
# If it's been accepted, save the addresses in the message $header->noexit(1); $header->pipe("lbdb-fetchaddr"); $header->noexit(0);
.muttrc
file:
set query_command="lbdbq '%s'"
lbdb/rc
to specify that: METHODS="m_muttalias m_inmail"
With built-in commands to add people to my address book and query it as described above, Mutt is providing the bulk the interface I need to manage e-mail addresses.
For the long term, there are some console-based address book applications that look promising. Going beyond e-mail address books, these programs could be complete address book solutions. Here I've been most impressed with abook and rolo. Neither feels finished enough yet to try adopting yet. Abook didn't seem to have a way to store a list of e-mail addresses in a record. Rolo doesn't yet provide an easy way to edit the VCard format it uses. If I switched to one of these, I would use it as a complete address book solution, not just for Mutt.
I found this feature most useful when integrating with the SpamAssassin spam filtering system. I was able to define key bindings for "Delete as Spam" and "Delete as Ham". These send mail to separate folders instead of being deleted immediately. From there, a cron script processes them to further train the filtering system about what spam is (and is not). Without configurable key-bindings this would not have been possible without fundamentally altering at the mail program. (Which is how Mozilla Mail and Apple Mail achieve much the same effect). With this system I spent very little time managing spam and less than 1% gets through the filter.
My .muttrc keybindings to integrate with SpamAssassin
# SpamAssassin integration # Delete is re-bound to move messages to Trash. They will be filed as ham by a cron script later. macro index d "s=Trash\n" "move message to trash" macro pager d "s=Trash\n" "move message to trash" # Spam that SA missed is manually sent to the junkmail folder macro index X "s=junkmail\n" "file as Spam" macro pager X "s=junkmail\n" "file as Spam" # Junk/spam mail older than two days is automatically marked for deletion # because it will have already been processed as spam by a cron script folder-hook "=junkmail" 'push"D~d>2d"\n'
My cron script to process to process spam and ham
#!/bin/sh TRASH=/home/mark/mail/Trash SPAMBOX=/home/mark/mail/junkmail [ -w $TRASH ] || exit 1 [ -w $SPAMBOX ] || exit 1 # process Trash as ham if /usr/local/bin/sa-learn --mbox --ham $TRASH then # delete Trash /bin/cat /dev/null > $TRASH echo "ham processed" else echo "ham not processed"; fi # process Spam, don't delete-- I'll review it by hand later /usr/local/bin/sa-learn --mbox --spam $SPAMBOX
My favorite use of this is to reply to multiple messages at once. This is great when someone has sent me several messages, and I want to send one reply to all the messages, quoting some text from each. I just tag some messages, use the 'apply' function, and the "reply" function.
.muttrc
file:
set edit_headers set editor="vim +/^$ ++1"
Editing the full headers is nice because I don't to have to worry about how to add a standard or non-standard header to a message. I can edit them all with the ease I perform other text editing.
On the vim side, I have it configured to recognize the temporary files that Mutt creates as "mail" files, and
highlight and format them accordingly. The relevant line in .vimrc
file looks like this:
" set up syntax highlighting for my e-mail au BufRead,BufNewFile .followup,.article,.letter,/tmp/pico*,nn.*,snd.*,/tmp/mutt* :set ft=mail
The beauty of being so configurable is that Mutt can be setup with time-savers particular to the way you like to use it.
Here's a small customization that has improved my experience. By default, the "help" keystroke displays the man page for Mutt. I re-bound those keys to display the HTML version of the documentation instead, which is much faster for me to navigate.
# w3m is a console web browser, replace it with whatever you want macro generic <f1> "!w3m /usr/doc/mutt/html/manual.html\n" "Show Mutt documentation" macro index <f1> "!w3m /usr/doc/mutt/html/manual.html\n" "Show Mutt documentation" macro pager <f1> "!w3m /usr/doc/mutt/html/manual.html\n" "Show Mutt documentation"