Archive for August, 2006
OSX, mutt, and esmtp
I’ve been a long-time fan of mutt, the command-line email application. I won’t go into why this is such a great tool as there’s plenty of other sites that explain why this is. But since I switched to using OSX about 14 months ago I’ve been sort of weening myself off it and using Apple’s Mail.app instead.
However, now I’ve seen the previews of ‘Leopard’ and the and the sheer amount of junk that Apple intend on throwing into the next version of Mail.app I’ve felt the need to get back to using mutt and making it work nicely under OSX.
So the easiest way of getting mutt up and running is via Darwinports. I installed mutt-devel with a couple of variants (the header_cache patch and support for IMAP / SSL), and there’s the basics sorted.
As mutt is just a MUA there’s a few other things you need in place for it all to work together. OSX itself comes with an install of Postfix but I’d rather not fudge with that in order to just get simple SMTP relaying that I need for mutt, so instead I decided to use esmtp, which is billed as ‘a user configurable relay-only Mail Transfer Agent (MTA) with a sendmail compatible syntax’. Perfect!
esmtp itself isn’t in Darwinports, although libesmtp is. Once that’s installed you’ll need to download and compile esmtp manually which is trivial enough. The only thing worth noting is that you’ll need to run ./configure with a couple of additional options:
$ ./configure –prefix=/opt/local –with-libesmtp=/opt/local/
Then you can run make and sudo make install to finish up. Then all you need in your .muttrc is:
set sendmail=”/opt/local/bin/esmtp -f your@email”
Omit the -f bit if you don’t have multiple accounts you need to send from.
So there’s the basics sorted. One other thing I did to make my life a bit more bearable is tie in some kind of notification for IMAP using Growl. I did this using a script from over here which polls your IMAP server for any new mail and then uses Growl’s command line notification tool to tell you what has just arrived.