24 Jun 2004
I've been trying out mutt, for no good reason other than the joy of tinkering. Yes, I know what I said, but sometimes the lure of the dotfile is too strong. I've used Mailsmith for quite a while, and I like it a lot. However, given my current infatuation with vim, I couldn't resist trying an email client that allow you to use vim to compose emails, and furthermore has a lot of vim-like keystrokes for moving around your mailboxes and issuing commands.
Configuring mutt isn't exactly a walk in the park. For a start, it is really meant for reading and composing mail that is delivered and sent by other tools. If you compile it correctly, you can get it to check POP or IMAP servers, but it isn't ideal if you have a number of different accounts to check. So the first thing I did was to set up fetchmail to get my mail and dump it in my /var/mail directory. Then I configured procmail to send the mails to an inbox in my home directory, doing a bit of filtering along the way via the excellent SpamAssassin to add an X-Spam header to spam and dump it straight in a spam mailbox. So far, it was all relatively easy, as both fetchmail and procmail are built in to Panther.
Mutt compiled without problems, but then I was faced with the task of getting it set up the way I wanted it. I was helped a lot by looking at other people's .muttrc files posted in various locations on the web. However, I get the feeling that tailoring your .muttrc is a kind of lifelong journey, rather than a quick job. I suppose it might be the equivalent of tending bonsai trees for geeks. To say that mutt is highly configurable would be a massive understatement. Almost everything can be altered—if you know the arcane sequence of commands necessary to set it up.
Despite all this, mutt is a lot easier to actually use than I ever thought a command-line email reader would be. I've installed aspell to check my spelling interactively while composing emails, and lynx to auto-render HTML emails as plain text. Even attaching and saving attachments is much simpler than I had anticipated.
There are only a couple of outstanding glitches:
mutt UI properly, so I'm running it inside screen which works fine.beep setting seems to only work when it feels like it.It might seem a bit mad to switch from a perfectly adequate mail client to another, but mutt is free (in all senses of the word), and it uses standard mbox format mailboxes, so it's pretty easy to switch back and forth. It's been quite a fun learning experience.
2
bob: Thanks! That's a big help. I think I can see what to do now. I've also edited your comment to sort out the parsing a bit, as others will probably find it useful too. mutt is soooo cool :-D
3
This is a bit of a fluff comment, but it's chock full o' the truth so I'm posting it anyway... Mutt is hands-down the best mail client I've used. (Beating, off the top of my head, elm, pine, eudora, zmail (all three forms: terminal, ncurses, and gui), any and all web-based mail clients, outlook, berk mail, and probably more.) ![]()
by Brian Tanaka @ 25/06/2004 1:07 am • Permalink •
4
Let's face it, you want to be a command line commando.
5
Brian Tanaka: You're not wrong. I discovered l today, I felt like someone whose Mini has had its engine replaced by one from a Ferrari! It's a stealth email client...
jcwinnie: Hehe.
That's exactly what I want to be. Is there a badge?
bob: I forgot to ask how you have Terminal configured. Do you have a .termcap, or have you just set the correct terminal emulation? I've got mine set as xterm-color, but this doesn't seem to work without screen for mutt. But none of the other emulation settings seemed to do the trick either. It doesn't particularly matter, because I generally use screen anyway when I open a Terminal. But, y'know, you've got to get these things right ![]()
6
I haven't run mutt since I left college about four years ago, but I did spent a number of years with it (starting at about version .56) and will definately agree that working with your .muttrc is definately a lifelong journey.
by The Plaid Cow @ 27/06/2004 4:06 am • Permalink •
1
Yay! You've discovered The One True Mail Client and you use The One True Editor too...amazing. I love Mutt. In fact, you can pry mutt from my cold, dead hands. I've used it for years, and I'll never go back to a GUI client. Mutt is fast, efficient, and just all around rocks.
You're right that the .muttrc is a lifelong journey. I used to change mine frequently (I'd be happy to share it with you if you're interested), but I think I've hit a relatively stable plateau now where I only muck with the colors.
As for hooks, this might help:
I use TMDA to keep spam out of my box, and so have custom addresses for just about everything. This becomes a pain for email lists, but this is where Mutt's send hooks make life beautiful. In my .muttrc, I have the following:
send-hook 'docs@wordpress.org' 'my_hdr From: Bob Torres <bob-keyword-******@rjtorres.net&>'&rt;I've starred out part of my address for obvious reasons - the original is a direct path to my inbox, and I had to put parentheses around the < to make it not disappear in your comments)It should be clear what this does: if the mail is to 'docs@wordpress.org' it changes my From header to the pre-set address that I have for that list. That should give you what you're after. I use folder hooks to control the sort order and index format of boxes:
e.g.
folder-hook . set sort=threadsand
folder-hook . 'set index_format="L %Z%?M?+& ? %[%d%b] %-20.20n %-50.50s %> %?Y?[%Y] & %-5.0Z ?(L) "'and
folder-hook +sent-mail 'set index_format="%Z %D %4l %-20.20F %s"'(translating those options is up to you!)
oh, as for Terminal.app, it works for me just fine, so make sure your term settings are correct. If screen works, then you can probably live with it as-is.
One last thing: as for mail in new boxes, make sure that the new boxes are listed in your .muttrc. If they aren't listed, you won't get notification. I have this in my .muttrc
mailboxes +zmag.org
(also see the 'lists' and 'subscribe' commands - or check out linuxbrit.co.uk - he has a nice section on using procmail for mailing lists and automatically adding them in Mutt that works very well)
good luck in your mutt odyssey! sorry to spam your comments...i'm just a mutt evangelist, and happy when others see glimmers of the light. ; )----- ah crap - looks like part of my post got parsed -- check the source to see what I'm trying to tell you....
by bob @ 24/06/2004 7:07 pm • Permalink •