Email.

The mutt! What can I say? I use email a lot. It is a necessity in the world of physics. (The WWW was invented at a physics lab!). So the little annoying things in the program I use to send email become big annoying issues. Then I discovered mutt.

See my latest discovery in the land of mutt...

Where does the name come from?

Mutt combines features of several good mailers. It is therefore a mixture of breeds, like a "mongrel dog". And "mutt" the English word for "a mongrel dog" That's why its icon shows a little doggy.

[Mutt Mail Agent Button]

Why Use Mutt

According to the Mutt FAQ the top two reasons to switch are colour support and threading. A picture is worth a thousand words! Naturally you don't have to use this colour scheme, or even colours and threading. But it makes your life so much easier.

In this world of email attachments you need an email program that handles them properly (and that doesn't mean automatically running everything - Hint! Hint! Microsoft.) Elm is truly horrific in this regard, and Pine is mediocre. Mutt's MIME support was built in so it isn't difficult to deal with attachments.

Mutt can open a web browser for you with an URL from the mail body! Are you on mailing lists? Using mutt with procmail means you can easily split up mailing list digests into individual emails.


Mutt Vs. Elm

There is a (somewhat out of date) comparison of the features of Mutt and Elm at http://www.math.fu-berlin.de/~guckes/mutt/vs.elm.php3.

(From the page) To sum it up, there "feature score" of this comparison is:

Mutt 54
Elm 6

(I reckon this 6 is being generous. I have thought that only one of these "features" would be nice...)


Mutt Vs. Other Mail Programs

Ha ha ha ha... That's a good one.

Seriously though, why look elsewhere? Mutt obeys the various Internet standards. Unlike most other mailers(*)!

It is easy to use, configurable, supports encryption, free (forever), allows remote mailboxes (IMAP/POP), well supported, has a thriving user base that helps new users. Where do I stop? Why haven't you downloaded it yet?

(* and don't even GET ME STARTED on Microsoft products! I really wish those guys would get a dictionary and look up the meaning of standard!)


My Latest Discovery

I've been using mutt religiously for a couple of years now and I am still discovering little tweaks that I can add to make it more usable. I will endeavour to put a description of the latest thing to get me excited in this section...

03 Oct 2003: Attribution fun. I wanted to set up my email so that when I replied to a message I get the following at the top of my email:

G'day Nicolas,

* Nicolas Somebody <nobody@devnull.spamcop.net> [031003 11:41]:

and then the message I am replying to, correctly quoted. This is simply done in mutt. I just change the attribution variable. The tricky thing is that I want this to be my default attribution, as I have different attributions based on who i am mailing... Thus I need to use a send-hook also, and get the quotes right:

send-hook . "set attribution=\"G'day %v,\n\n* %n <%a> [%(%y%m%d %H:%M)]:\""

I was having some trouble with the various quotes in this, but a message to the mutt-users mailing list sorted it out in just 8 minutes!

28 Oct 2002: Digital Signatures. Email is one of the easiest things to forge on the 'net, and yet we use it to conduct business. The easiest way around the problem is to use digital signatures [1][2][3]. However if this is to work you need to verify the messages received, but equivalently if you are on mailing lists you don't want your public keyring to become bloated with the keys of people you don't know.

I got around this by telling GPG to automatically download new keys when it needs to and to use a different keyring (mutt-pubring.gpg) to store them. This is all done in the simple script muttgpg:

#!/bin/sh
gpg --no-default-keyring       \
    --keyring mutt-pubring.gpg \
    --keyring pubring.gpg      \
    --keyserver-options auto-key-retrieve "$@"

I then simply changed all the gpg calls in my gpg.rc to muttgpg and Bjorn Stronginthearm is your uncle. :-)

22 Oct 2002: Microsoft Outlook Fun. A couple of people who mail me use that 'orrible program. When I found the Anti-Outlook Page I just had to use the tools available to me. Using the my_hdr command I can easily play with what they see... I've could set the headers as:

my_hdr X-Message-Flag: Intolerant people should be shot.
my_hdr X-MSMail-Priority: High

and then the messages would appear as this in their Inbox, and this when they read it. (With different messages obviously...) The nice thing about these headers is that the ONLY effect MS users, and no-one else. :-)

10 Oct 2002: Collapsed threads. I've been using the threading in mutt for a while now. However I wanted to get a bit more out of my mailer.

In my Inbox I want strict threading (strict_threads) so I know how each message relates to each other.

However in my saved mail folders I want a more relaxed approach since some mailers (hello microshite) haven't understood the concept of "In-Reply-To" and "References" fields. In these other folders I also want the threads collapsed unless there is a new message (collapse_unread).

Finally, to make this all more difficult I want relaxed threading, with all threads collapsed when I am reading mail from a mailing list that I receive as a digest.

Whilst all of this is happening I want my list of mail to show me (index_format) either the number of messages in the collapsed thread, or the number of lines in the message (if it is not part of a collapsed thread).

Pictures might be useful here...

  1. My Inbox will look something like this.
  2. My saved mail should look like this
  3. Finally digest mail should look like this. Previously this digest would have been more disorganised.

See how in (2) and (3) the collapsed threads list the number of messages in the thread? :-) When I read a collapsed thread in the digest the thread then expands.

This is all find and dandy, but how difficult is it to put into practice? I was somewhat surprised when it only took 6 lines in my muttrc and a new two line file. Easy!!!

My index_format variable is set as

set index_format="%4C %Z %{%b %d} %-15.15L %?M?(#%03M)&(%4l)? %s"

My folder-hooks are set as

unset collapse_unread
#  I want (slack) collapsed threading in general.
folder-hook   "."   unset strict_threads
folder-hook   "."   push "<collapse-all>"
#  Except for my Inbox.
folder-hook   "!"   set   strict_threads
folder-hook   "!"   push "<collapse-all>"

And I have the following ~/.mutt/metamuttrc

source ${HOME}/.mutt/muttrc
set collapse_unread

This is why I love my mutt. In 8 (simple) lines I have totally reconfigured it to behave differently for three types of mailboxes. What other mail program is so easy to work with? There isn't one!


Valid HTML 4.01! Valid CSS!
Stewart V. Wright <stewartvwright@gmail.com>
Last modified: $Date: 2006-05-05 16:18:09 -0500 (Fri, 05 May 2006) $