Pages

Friday, January 4

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. http://nion.modprobe.de/mutt-ng/snapshots/ 
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.  http://developer.apple.com  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.)  http://sourceforge.net/project/showfiles.php?group_id=86651
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
Password:
Done.
6. Go get lbdb.  http://www.spinnaker.de/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
Password:
Done.
7. Go get gdbm.  We are going to need this for the header caching in muttng.  http://mirrors.kernel.org/gnu/gdbm/
$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:
"$(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP)"
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
Password:
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
Password:

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.  http://linsec.ca/Using_mutt_on_OS_X


Subscribe in a reader

3 comments:

Matthew Lee Hinman said...

Some more excellent references for Mutt on OSX:

http://linsec.ca/Using_mutt_on_OS_X

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

http://thnetos.wordpress.com/2007/09/18/how-i-do-gtd/

Matthew Lee Hinman said...

Some more excellent references for Mutt on OSX:http://linsec.ca/Using_mutt_on_OS_XAnd my own shameless plug for using Mutt on OSX myself :)http://thnetos.wordpress.com/2007/09/18/how-i-do-gtd/

Matthew Lee Hinman said...

Some more excellent references for Mutt on OSX:http://linsec.ca/Using_mutt_on_OS_XAnd my own shameless plug for using Mutt on OSX myself :)http://thnetos.wordpress.com/2007/09/18/how-i-do-gtd/