voipmeister.com voip stuff matters and more

Articles tagged with mutt

Using mutt on Mac OS X

Not kind of a VoIP related post, mainly posted for reference.

It is possible to use mutt on Mac OS X, You have 2 choices:

  1. Install mutt via macports
  2. Compile it yourself

Since I like to know what’s going on, I like compiling it from source. That’s what’s going to be described here. We will also look at macports to satisfy build dependencies, specifically for BerkeleyDB, which is used for the header cache. Furthermore, we’ll have a look at some nifty programs to interact with mutt.

1. Install macports

The macports project lives at http://www.macports.org, so head over there (more specific, go to http://www.macports.org/install.php to learn how to install macports on your Mac). Basically, you need to download a dmg image and mount it, after which you can install macports. After installation, the port binary lives in:

/opt/local/bin

For me, this location was added to the PATH variable after restarting (IIRC).

2. Install BerkelyDB

Next is the installation of BerkeleyDB for the header cache of mutt (which is supposed to speed up things a lot). Start the port binary as root, and install BerkeleyDB 4.7:

sudo /opt/local/bin/port
Password:
MacPorts 1.9.2
Entering interactive mode... ("help" for help, "quit" to quit)
[mutt/mutt-1.5.20] >install db47

If all went well, you’ll end up with BerkeleyDB 4.7 living in /opt/local. On to the compiling of mutt.

3. Download and extract mutt (side bar optional)

Download and extract mutt as follows:

curl -O ftp://ftp.mutt.org/mutt/devel/mutt-1.5.20.tar.gz
tar -zxpf mutt-1.5.20.tar.gz
cd mutt-1.5.20

While in the mutt directory, download and apply the sidebar patch if desired (OPTIONAL):

curl -O http://lunar-linux.org/~tchan/mutt/patch-1.5.20.sidebar.20090619.txt
patch -p1 <patch-1.5.20.sidebar.20090619.txt

Next, we need to tweak the configure script a bit, or you’ll end up with:

configure: error: You need Tokyo Cabinet, QDBM, GDBM or Berkeley DB4 for hcache

There are various suggestions to resolve this issue. None of the ones I found worked. What did work, was the tweak below (the tweak is necessary because the configure script doesn’t look for BerkeleyDB versions higher than 4.6):

vim configure

then, search for

BDB_VERSIONS="db-4 db4 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"

and replace it with:

BDB_VERSIONS="db-4.7 db4.7 db47 db-4 db4 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"

Please not the 4.7 variations at the beginning of the array. Now you can start compiling:

./configure --prefix=/sw --with-curses --with-regex --enable-locales-fix   --enable-pop --enable-imap --enable-smtp --with-sasl=/sw --enable-hcache --with-ssl --mandir=/sw/share/man
make
sudo make install

The software will be installed in /sw. Optionally, you may want to include this in your path or symlink from /usr/bin to binaries in /sw/bin.

References

Thanks to linsec.ca for the idea: http://linsec.ca/Using_mutt_on_OS_X