Skip to main content

Getting Muttng to work on OSX

Okay, I've been meaning to do this for awhile, but I keep forgetting to do it.  So here goes, a step by step guide on getting muttng to work on OSX.  Leopard, btw.  I can't help you with Tiger anymore.

For my purposes, I am going to enable header cacheing (handy, so muttng doesn't have to do a lookup of every email header on the server).  I am going to use IMAP.  I am going to make muttng able to query OSX's Address Book (VERY HANDY), and we are going to use msmtp for the smtp agent.

1.  Go download mutt-ng, grab the latest snapshot.  You can either wget it, or just click on the package you want.  It's only about 2.6 Mb. 
2.  If you don't have Xcode installed on your machine, (which you don't really need, but you DO need gcc, and since that comes with the Xcode developer package...) go get it.  You will need an Apple Developer login, which, is free.  Download that, and install it.  It's 1.16Gb, so it's not a download for dialup or your cell card. (Unless you have a lot of time)
3.  Go get msmtp, our smtp agent (you can use whatever you want, but I am not going to help you.  I am using msmtp, if you don't like it... get over it.)
4. I am going to make a directory in my "~" path named Software.  So..
~$ mkdir Software
~$ cd Software
Software$ mv ~/Downloads/mutt* msmtp* .
5.  Let's set-up msmtp first.
Software$ bzip2 -d msmtp-1.4.13.tar.bz2
Software$ tar xvf msmtp-1.4.13.tar
Software$ cd msmtp-1.4.13/
msmtp-1.4.13$ ./configure --with-ssl=openssl
msmtp-1.4.13$ make
msmtp-1.4.13$ sudo make install
6. Go get lbdb.  We are going to use this for our Address Book queries.  Let's move that into our Software directory as well.
~$ cd Software
Software$ mv ~/Downloads/lbdb* .
Software$ tar xvf lbdb_0.35.1.tar
Software$ cd lbdb-0.35.1/
lbdb-0.36.1$ ./configure
lbdb-0.36.1$ make
lbdb-0.36.1$ sudo make install
7. Go get gdbm.  We are going to need this for the header caching in muttng.
$cd ~/Software
Software$ mv ~/Downloads/gdbm* .
Software$ tar xvf gdbm-1.8.3.tar
Software$ cd gdbm-1.8.3/
gdbm-1.8.3$ ./configure
gdbm-1.8.3$ make
gdbm-1.8.3$ sudo make install
Now, gdbm will ERROR on you.  It'll say something like:
install: bin: Invalid argument
Do not be alarmed.  Follow the below steps.  Btw -- if you don't know your way around vi, don't even attempt this, because I am not going to help you.
gdbm-1.8.3$ vi +134 Makefile
vi will open and you will be on line 134.  On this line you should see something like:
You need to delete "-o $(BINOWN) -g $(BINGRP)" from this line
and line 136
and line 138.
Save and quit this file. (:wq)
Now, we are back at the prompt.
gdbm-1.8.3$ sudo make install
Everything should now be installed correctly.  You have to do that because OSX doesn't have a user or a group named bin.  By removing that, you just give the permissions to root.  So, use at your own risk.
8.  Now for muttng.  Let's go..
$ cd ~/Software
Software$ tar xvf muttng-20061125.tar
Software$ cd muttng-20061125/
muttng-20061125$ ./configure --enable-hcache --enable-imap --with-ssl
muttng-20061125$ make
muttng-20061125$ sudo make install

There, now you have muttng installed with the all the features I listed above.  It's just up to you now to get it all working.

I'll give you a couple hints.

#1)  How to make muttng query your OSX Address Book.
Software$ cd /usr/local/etc
etc$ sudo vi +43 lbdb.rc
Change this line from METHODS="m_inmail m_passwd m_finger" to METHODS="m_muttalias m_osx_addressbook"
Save and quit vi (:wq)
Now, when  you create your .muttngrc file in your "~" directory, your query line should read:
"set query_command="/usr/local/lbdb/bin/lbdbq '%s'"
Then when you are trying to search for a name, say when you writing an email, and you type "John" into your "To:" line in muttng.  Mash Ctrl-T, and it will give you a display of all the "john"'s in your addressbook, and you can pick the one you want.

I'll post some futher hints later about elinks and what not.  Hope this helps you!

UPDATE:  An excellent resource to getting mutt on OSX.

Subscribe in a reader


Some more excellent references for Mutt on OSX:

And my own shameless plug for using Mutt on OSX myself :)

Popular posts from this blog

Offset, Depth, Distance, and Within

Without going off the deep-end here and discussing every single Snort rule keyword, I just wanted to touch on a few modifiers that people sometimes misunderstand.  They aren't difficult, and hopefully after this explanation and a few examples, I can clear some of the air around these five modifiers.

The five modifiers that I am talking about are
OffsetDepthDistanceWithinnocaseThese five modifiers are not keywords of themselves, but rather they apply as modifiers to another keyword.  That keyword is "content". The content keyword is one of the easiest pieces of the Snort rules language as all it does is look for a particular string.  So for instance if I wanted to look for the word "joel" within a packet.  A simple:
content:"joel";Would allow me to do that.  The interesting part comes into play when you want to specify where inside of a particular packet you want the string "joel" to be looked for.  If you are running just a plain content ma…

Writing Snort Rules Correctly

Let me start off by saying I'm not bashing the writer of this article, and I'm trying not to be super critical.  I don't want to discourage this person from writing articles about Snort rules.  It's great when people in the Snort community step up and explain some simple things out there.  There are mistakes, it comes with the territory.  If you choose to be one of the people that tries to write Snort rules, you also choose to be someone who wants to learn how to do it better.  That's why I write this blog post, not to bash the writer, but to teach.

I noticed this post today over at the "Tao of Signature Writing" blog, and to be honest I glanced over most of it figuring it was a rehash of things I've already read or things that have already been written from countless people about "Here's how you write Snort rules!".  I scrolled down quickly skimming, not reading at all really, and noticed this part:
Now, let us look at the second questio…

Safari 5.1.4 now available

Safari 5.1.4 now available, fixes issues and improves performance | TUAW - The Unofficial Apple Weblog:

Improve JavaScript performanceImprove responsiveness when typing into the search field after changing network configurations or with an intermittent network connectionAddress an issue that could cause webpages to flash white when switching between Safari windowsAddress issues that prevented printing U.S. Postal Service shipping labels and embedded PDFsPreserve links in PDFs saved from webpagesFix an issue that could make Flash content appear incomplete after using gesture zoomingFix an issue that could cause the screen to dim while watching HTML5 videoImprove stability, compatibility and startup time when using extensionsAllow cookies set during regular browsing to be available after using Private BrowsingFix an issue that could cause some data to be left behind after pressing the "Remove All Website Data" button