Use lbdb to combine contact sources for easy address lookup
Takeaway: Vincent Danen describes a handy little tool that makes it easy to search for addresses outside of your e-mail client. See what the Little Brother's Database (lbdb) can do for you.
Address book storage varies by e-mail client; many keep contacts in their own storage format that makes them inaccessible to other clients. One program, called the Little Brother's Database, can bring many of these together to make it easy to search for contacts outside of your e-mail client.
Little Brother's Database (lbdb) can be downloaded from its home page. Primarily, it was written to make various address sources available to Emacs mailers and Mutt, but it can be used as a standalone query client as well.
It supports a variety of different address sources, including the passwd file, YP/NIS, LDAP, PGP/GnuPG keyrings, the Mutt aliases file, the Pine address book, GnomeCard, the Palm address database (if you sync your Palm address book to your desktop using a program such as jPilot), Evolution, and vCard files. If you run lbdb on Mac OS X, you can even search the OS X Address Book.
To begin, download and untar the file to compile it; some distributions may come with lbdb included or in a third-party repository. Use various --with commands to add support for address sources you like (most get included by default, but not all):
$ cd lbdb-0.34
$ ./configure --prefix=/usr/local --with-gpg \
--with-evolution-addressbook-export --with-niscat
$ make
$ sudo make install
This will install lbdb into /usr/local/. Then edit ~/.lbdbrc and change the METHODS keyword to include support for the lookup methods you want to use:
METHODS="m_muttalias m_evolution m_ldap m_gpg"
This will perform lookups via Mutt's aliases file, Evolution's address book, LDAP, and GnuPG. You'll also want to go through the sample lbdb.rc file to configure the various modules, which typically sets paths to various data sources.
The /usr/local/bin/lbdbq program does the actual lookups. To search for an address, use:
$ /usr/local/bin/lbdbq joe@joe.com
lbdbq: 1 matches
joe@joe.com Joe User (GnuPG)
Although lbdb is a small program, its ability to combine disparate address sources may be welcome to many users.
Delivered each Tuesday, TechRepublic's free Linux NetNote provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!
SponsoredWhite Papers, Webcasts, and Downloads
- 7 More Red Hat Linux Tips and Tricks Global Knowledge
- Realize the Power of Truly Mobile Operations PC Connection
- Live Webcast: Reduce Your Costs and Prepare for Tomorrow with BMC CONTROL-M BMC Software
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET

