Oct 26, '04 10:08:00AM • Contributed by: bluehz
- Download, compile and install The Little Brother's Database (lbdb)
- Modify the lbdb options
- Modify your mutt options to query lbdb
Download and Install lbdb
Create the following script and make it executable (chmod +x script_name) to download, compile, and install the Little Brother's Database. Or you can do it yourself if you prefer...
Modify the lbdb Options:
#!/bin/sh # This script will download the source code # for lbdb, compile and install it in # /usr/local/lbdb self-contained location. # # You must have Developer Tools installed to compile # Download the source code curl -O http://www.spinnaker.de/debian/lbdb_0.29.tar.gz tar -zxvf lbdb_0.29.tar.gz cd lbdb_0.29 # Configure, compile, and install ./configure --prefix=/usr/local/lbdb --libdir=/usr/local/lbdb/lib sudo make install # Move the man pages to a more friendly location ln -s /usr/local/lbdb/man/man1/* /usr/local/man/man1/
You need to modify a few things in the lbdb configuration file. Open the config file with your favorite editor:
Change this line (line 42):
sudo pico /usr/local/lbdb/etc/lbdb.rc
# METHODS="m_inmail m_passwd m_finger"
and uncomment the following lines (line 67-68):
Modify Your Mutt Options:
#MUTT_DIRECTORY="$HOME/.mutt" #MUTTALIAS_FILES=".muttrc .mail_aliases muttrc aliases"
Now you need to tell mutt to use lbdb to query the Mac OS X Address Book. Add the following line somewhere in your mutt options. For most people, that will probably be ~/.mutt/muttrc or ~/.mutt/options.
If you installed lbdb in a location other than as shown in Step 1 above, then alter the path as needed to point to the correct lbdb binary.
set query_command="/usr/local/lbdb/bin/lbdbq '%s'"
Thats it! Restart mutt. Now to use it, simply start addressing a new message, type a few characters of the name. Then type Control-T, and lbdb will query your mutt aliases file and your Mac OSX Address Book, looking for an approriate entry. Select an entry and continue with your message composition.
There are MANY more options available for lbdb, including harvesting addresses from incoming mail, using gnupg, ldap lookup, etc. If you need those functions, be sure to look at the man page for lbdbq and also the sources listed below.
The Little Brother's Database (lbdb)
Mark's Mutt Fan and Tip page