2008-10-05

Back to the old

I recently decided to go back to using mutt, a text based mailer for 'nix systems. While simple to look at, mutt is an extremely powerful. Because it acts only as a mail reader, it can be a bit of a challenge to set up, particularly if you're not aware of how mail is handled in Linux. There's also a few tweaks you can make to add some useful functionality. This is one of the beauties of mutt, you can script it to run exactly how you want it to, not how someone else wants you to manage your email.

I thought I'd put up a brief blurb of what I used and how I got it running as some resources are pretty scattered and not always written in plain language. I'm not going to go into a lot of details about configuration, there's lots of sources for that out there already. My favourites include My First Mutt and Randall Wood's excellent mutt manual


I run Zenwalk 5.0 on both my laptop and desktop. It's a minimalist Slackware distro that tries to stick to the premise of one application per task. You have the options of changing which application you might want from the substantial package database, and I find that it's a fairly painless distro to setup and use. Plus I like the Slackware architecture.

For my mutt installation, I used:

  • Mutt version 1.518
  • abook an address book designed for mutt and as well as a patch to allow abook to import vcards
  • getmail , the Mail Transfer Agent (MTA) I decided to use.
  • esmtp - a Mail Transfer (sending) Agent I decided to use instead of setting up sendmail.
  • urlview which allows mutt to route inline html addresses to the web-browser or your choice.

Step 1: Install mutt. I installed mutt with both pop3 support and imap support. You can configure mutt to get connect to a pop or imap address. I just configure it with these options in case I wanted to do this. If you use a mail transfer agent, you can just compile mutt without these options. I figured using a mail transfer agent was my best option as I want to download mail from at least three email accounts.

Step2: Getting your email requires a mail delivery agent to pick up your mail on remote servers and put it somewhere on your computer for mutt to access. If you only have one account, mutt can do this for you. I have several, including gmail. After looking at the options, I found getmail to be easiest to configure for multiple locations. You need to write a configuration file (getmailrc) for each address and then configure mutt to run all of them in the get mail command from mutt. You can also set getmail up as a cronjob and run it at whatever interval you like to check your email.

Step 3 For sending email, rather than use the complex sendmail system, I opted to use esmtp. If you're setting up gmail, be sure to set permissions for the certificate folder and file using the command line rather than a file manager. You need all four digits set in the chmod to get the directory and certificate file to work. Depending on your system, esmtp needs libesmtp to run.

Step 4 So now mutt can send and get mail with no problem. I added abook (version 0.6.0pre2 patched with the vcard patch). The vcard patch works only on this version. To patch the file, untar the tarball and run the patch file from the root directory of the tarball. This will get the patch rolling. It may prompt you for the other file names that are present in the start of the patch file. I tend to use mutt's alias feature for mailing lists and abook for individual addresses. I also added urlview to route inline html addresses. Once urlview is installed, you need an .urlview file in your user directory. Put in the first line Command nameofyourwebbrowers %s. This is what worked for me (Command iceweasel %s). When urlview presents you with the link list, clicking the link will start your browser.

The various pager commands etc. to run some of this stuff in mutt are included on My First Mutt.

What I didn't do is setup procmail. For one, I don't get a lot of spam email. For another, I like to sort my mail myself rather than setup a filter and then look through multiple folders for new mail that's been sorted. I also tend to use a Getting things done approach to my email. More on this method here. I find the GTD method a good way to keep a handle on my emails and what I need to do, not just a method of putting them in various piles.

I don't use a vim outline, I use hnb, an ncurses hierarchial notebook.