Command-line tool mutt has a well-deserved reputation as a powerhouse of an email client. It's fast, flexible and, best of all, surprisingly easy to use. Unfortunately getting the thing up and running can be, put mildly, a bit of a chore.
If you've been tempted by mutt but put off by its complex array of options, the following basic setup will give you a chance to try it out on your Gmail account with a minimum of setup. So fire up your terminal and let's get started.
Installing mutt
To install mutt on Ubuntu:
sudo apt-get install mutt
To install mutt on OS X, you can use MacPorts:
sudo port -vc install mutt-devel +gnuregex +gpgme +headercache +imap +sasl +smtp +ssl +tokyocabinet
Or Homebrew:
brew install mutt
Next, create the directories mutt needs to cache message headers and bodies, and store certificates, by pasting the following commands:
mkdir -p ~/.mutt/cache/headers mkdir ~/.mutt/cache/bodies touch ~/.mutt/certificates
Now, pick one of the configuration files below, save it in your home directory, and rename it to .muttrc
:
(Due to a trademark dispute, we British Gmail users have a slightly different setup.)
Open up the ~/.muttrc
file in your favorite text editor, add your name, Gmail address and password—everything you'll need to alter is in ALL CAPS—and save the file. (Ed note: Saving passwords in plain text is a nightmare for the tin-foil hat crowd, so if you'd rather not, just leave the password fields blank and mutt will prompt you for the passwords when they're necessary.)
Read, Reply to, and Send Email from mutt
Now you're ready to read, reply to, and send email from mutt: Run it from the command line by simply typing mutt
. The first time you do this, you'll be prompted to accept two SSL certificates from Google; press 'a' to always accept these certificates. You should now be greeted by your Gmail inbox (if you didn't save your passwords in the .muttrc file above, you'll be prompted for that first):
mutt is controlled from the keyboard, and, helpfully, displays a context-aware list of shortcuts at the top of every window.
The following shortcuts for navigating and processing mail should be familiar from Gmail's web interface:
j
to move down.k
to move up.d
to delete a messagey
to archive onegi
to view your Inboxga
to view All Mailgd
to view Draftsgs
to view Starred messages
And here are a few more that are particular to mutt:
t
will mark a messages
will save one, or morec
lets you change to a different folder/
lets you search the current folder
To view messages outside your inbox, type c
and either type ?
to view a list of all your tags and folders, or prepend your tag with an equals sign. So, to view messages tagged 'work', you'd type c
, then =work
, then hit Return.
Similarly, to save a message to the 'work' folder—the equivalent of labeling in Gmail—type s
, then =work
, then hit Return. If you've used t
to mark a bunch of messages, then saving will apply to all of them.
You'll notice that, for some of the above commands, mutt won't do anything right away, instead marking messages for later processing. Once you're sure you've made all the changes you want to, e.g., deleted the right message, hit the $
key and mutt will apply all your changes to your Gmail account.
Sending mail with mutt
Ready to send your first message with mutt? The basics look like this:
- Type
m
(orr
if you're replying to a mail) - Enter the recipients email address; hit Return
- Enter a subject; hit Return
- Write your message.
- Save it.
- Type
y
, and your message will be sent.
All done? Type q
to quit mutt.
We've really just scratched the surface, so if you've spent much time with mutt in the past, let's hear your favorite tips and features in the comments.
Jack Mottram is a writer and technology lover. You can find more of his writing at One Thing Well, a weblog about simple, useful software.