Some Mutt notes
7 February 2007
I have moved my academic/work email account to the Mutt email client.
Mutt follows the traditional Unix philosophy - do one thing very well. You combine it with other programs to get the full email system.
My setup uses fetchmail to bring the email onto my network, procmail to do any filtering and preprocessing that I want, nbsmtp to send email, and Emacs to compose email. Mutt acts as the front end to it all.
Emacs happens to be a text editor I use a lot, you can use any one you like. Fetchmail and procmail worked more or less out of the box as they came down from my distribution, just a one line config for fetchmail telling it where to find my Uni's email server, and any optional filtering I want in procmail. An alternative to storing the email locally in this way would be to connect Mutt directly to an IMAP server.
Mutt's config file is the most interesting. Adding the colours from the example here improved my experience no end. I also told it that I wanted Emacs, rather than the default Nano. Other information in the mattrc file was where my email is stored and where my smtp server is.
Mutt walkthrough
So when I started Mutt for the first time, the email account had about 2000 emails in one big inbox. I then did a little clearing up, so here is a walkthrough of some basic organising.
When you open Mutt, as you might expect, the emails are in a vertical list. You press up and down to scroll through them. Pressing the 'Enter' key lets you read an email, 'd' deletes emails. 'm' composes a new email in your preferred text editor.
To save an email to a folder, press the 's' key. It will offer you a suggested folder name, but you can also specify your own. The defaults are to organise emails by sender. Of course, if someone emails you only infrequently, then you might want to label their email with something more generic.
Sorting out 2000 emails, one by one, is a bit slow, so you can do things in batches.
Shift+t brings up the question "Tag messages matching: " in the minibuffer.
So if I type ~f Tim, then it will select ('tag' in mutt terminology) all emails that have the letters Tim within the from field.
Now I have many emails highlighted, I type ; then s.
; tells Mutt that you want to perform the following action on all tagged items.
Finally typing $, allows you to refresh the client, which gets rid of everything that you have marked for removal or to be moved.
Mutt docs
There are some good guides out there:
- Woodnotes Guide to the Mutt Email Client is what I wish I had found first. Really helpful 30ish page, one chapter, book on Mutt.
- My First Mutt contains guides to many features of Mutt.
- The Official Manual
- QuickStart Guide to Mutt E-Mail by Mike Polniak, Gentoo Linux. An integrated system similar to what I ended up with.



1 Scott says...
I use mutt for email during the day logged into my server's host. It processes the same local file system files that my personal iBook views via Mail.app and IMAPS when I get home. It's been several months and it works wonderfully. Everything stays in sync and I haven't seen any corruption despite having two very different mail clients looking at the same data. (all hail mbox and IMAP!) During the day using mutt to surreptitiously keep up on email (office IT firewall blocks most smtp/pop/imap ports) while using Apple's decent Mail.app for its GUI-ness when back at home.
Posted at 11:49 p.m. on February 7, 2007
2 Bill Traynor says...
The link provided to the Woodnotes Guid to the Mutt Email Client seems to be broken. Here's a valid link:
http://therandymon.com/content/view/42/98/
Posted at 2:33 p.m. on May 1, 2009