Maildir search at its best!


Search, search and search – that’s what we all do in daily inhabitance. When it comes to maildir, the ‘mu-tools’ are its best. Mairix is one sort of alternative but mu is quite powerful and more customizable. The only problem is its installation on an RHEL5 based system such as CentOS5. The problem starts on the fact that development of mu seems to have happened on a Debian based distro which by all means is more advanced in system core packages. Debian or Ubuntu is meant for the cutting-edge technology with latest up-to-date packages while Red Hat on other side doesn’t really like to keep all of the system core RPMs most up-to-date till their next major release or at least until then point when there are severe security flaws found in those packages. For example, you found a new tool, check with apt-get; you find it, install 1, 2, 3 and you’re ready to go! However, that’s not same thing with RHEL, even after loading bunch of third party repositories. Those who interact with both Debian and Red Hat Enterprise Linux on daily basis may know how difficult installing new applications can become. I hate it whenever this happens. Red Hat chose ‘stability’ over ‘updates’. Both of these infrastructures have their own downsides. Perhaps, that’s the reason why RHEL is widely deployed as server OS comparative to other distributions.

With that said, installation of mu is not that simple. Earlier in mu 0.4 it was a nightmare as I had to go through lots of and different installation errors, but now with thanks to developer Dirk-jan Binnema who fixed a bug for me and made a few changes to leisure its installation, it’s not that hard if you know the calculated amount of steps involved:

  • Compiling glib 2.24
  • Compiling and installing xapian and xapin-config
  • Adding /usr/local/bin/pkg-config to current PKG_CONFIG_PATH
  • Fixing that notorious bug of “undefined reference to sqlite3_prepare_v2″ in sqlite-dev package that exists in all RHEL related packages (not needed as version 0.7 eliminates sqlite dependency by using xapian instead)

Presuming that you’ve all compiling and development tools (gcc, gcc++, libtool), installation involves these underlined steps. Try not to use package versions other than the ones mentioned. Trust me, when I say that.

1. Installing glib2, updating system library and exporting pkg-config path.

# wget http://ftp.gnome.org/pub/gnome/sources/glib/2.24/glib-2.24.1.tar.gz
# tar zxvf glib-2.24.1.tar.gz
# cd glib-2.24.1/
# ./configure
# make
# make install
# echo "/usr/local/lib/" >> /etc/ld.so.conf.d/glib2-i386.conf
# ldconfig
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

2. Installing gmime

# wget http://dl.atrpms.net/el5-i386/atrpms/stable/atrpms-package-config-120-3.el5.i386.rpm
# rpm -ivh atrpms-package-config-120-3.el5.i386.rpm
# yum --enablerepo=atrpms install gmime-2.4.7-1.99 gmime-devel-2.4.7-1.99

3. Installing xapian

# wget http://centos.karan.org/kbsingh-CentOS-Extras.repo -0 /etc/yum.repos.d/kbsingh-CentOS-Extras.repo
# yum install --enable=kbs-CentOS-Testing xapian-core xapian-core-devel -y

4. Compiling and installing mu

# wget http://mu0.googlecode.com/files/mu-0.7.tar.gz
# git clone git://gitorious.org/mu/mu-ng.git
# tar zxvf mu-0.7.tar.gz
# rm -f mu-0.7/src/mu-cmd-index.c
# cp mu-ng/src/mu-cmd-index.c mu-0.7/src/
# cd mu-0.7/
# ./configure
# make
# make install

That’s all you need to get started. There’s no other tool like ‘mu view’ (formerly mu-msginfo) for getting instant command line outputs of an email formatted in maildir format. I instantly fell in love with it when I first used.
Wish a nice playing with it! :D

Quite ironically ‘mu’ means ‘mouth’ in Urdu/Hindi/Punjabi/Sindhi/Siraiki’. WTF dude !!!! :D !!!!

, , ,

  1. No comments yet.
(will not be published)