lbdbq - query program for the little brother's database
is the client program for the little brother's database. It will
attempt to invoke various modules to gather information about persons
E.g., it may look at a list of addresses from which you have received
mail, it may look at YP maps, or it may try to finger
The behavior is configurable: Upon startup,
will source the shell scripts:
They can be used to set the following global variables:
a space separated list of directories, where
should look for modules.
a space separated list of the modules to use.
If you set this to
lbdbq won't sort the addresses but returns them in reverse order
(which means that the most recent address in m_inmail database is
first). If you set this to
lbdbq sorts the output by real name. If you set this to
it sort the output by the comment (for example the date in
realizes the same as
but in reverse order, so the most recent timestamp of m_inmail may be
on top. If you set SORT_OUTPUT to
lbdbq sorts the output by addresses (that's the default).
If you set this to
lbdbq won't remove duplicate addresses with different real name
Note that there
defaults, so you should most
probably modify these variables using constructs like this:
Additionally, modules may have configuration variables of
Currently, the following modules are supplied with lbdb:
This module will use finger to find out something more about a person.
The list of hosts do be asked is configurable; use the
variable. Note that "localhost" will mean an invocation of your local
binary, and should thus work even if you don't provide the finger
service to the network.
tries to find out the machines mail domain name in
by parsing a
file (if it finds one) and by reading
If you know that this fails on your machine, or you want to force lbdbq
to consider some other name to be the local mail domain name (misconfigured
SUNs come to mind here), you can specify a name using the
variable. If this variable is set by you, no probing will be done by
This module will look up user name fragments in a list of mail
addresses created by
This module searches for matching entries in your local /etc/passwd
file. It evaluates the local machine mail domain in the same way
does. If you set
this module ignores all system accounts and only finds UIDs between
1000 and 29999 (all other UIDs are reserved on a Debian system).
This module searches for matching entries in the NIS password database
using the command ``ypcat passwd''.
This module searches for matching entries in the NIS+ password database
using the command ``niscat passwd.org_dir''.
This module searches for matching entries in whatever password
database is configured using the command ``getent passwd''.
m_pgp2, m_pgp5, m_gpg
These modules scan your PGP 2.*, PGP 5.* or GnuPG public key ring for
data. They use the programs
to get the data.
This module searches your Fido nodelist, stored in
This module uses the program
a text based address book application to search for addresses. You
can define multiple abook address books by setting the variable
to a space separated list.
This module searches the variable
(a space separated list) of files in
that contain mutt aliases. File names without leading slash will have
does not exist) prepended before the file name. Absolute file names
will be taken direct.
This module searches
addressbook files for aliases. To realize this it first inspects the
If it isn't set, the default
`/etc/pine.conf /etc/pine.conf.fixed .pinerc'
is used. To suppress inspecting the
variable, set it to
It than takes all
entries from these pinerc files and adds the contents of the variable
to the list, which defaults to
Then these addressbooks are searched for aliases. All filenames
without leading slash are searched in
This module searches the Palm address database using the
Perl modules from CPAN.
It searches in the variable
or if this isn't set in
This module searches for addresses in your GnomeCard database files.
is a whitespace separated list of GnomeCard data files. If this
variable isn't defined, the module searches in
for the GnomeCard database or at least falls back to
If a filename does not start with a slash, it is prefixed with
This module searches for addresses in your (X)Emacs BBDB (big brother
database). It doesn't access ~/.bbdb directly (yet) but calls
with a special mode to get the information (so don't expect too much
performance in this module). You can configure the
variable to tell this module which emacsen to use. Otherwise it will
fall back to
This module queries an LDAP server using the
Perl modules from CPAN. It can be configured using an external
You can explicity define a LDAP query in this file or you can use one
or more of the predefined queries from the
in this file. For this you have to define a space separated list of
nicknames from entries in the variable
This module searches for addresses stored in your
(or by default in
file, an addressbook of
This module queries the OS X AddressBook. It is only available on OS
This module queries the Ximian Evolution address book. It depends on
which is shipped with evolution.
This module uses libvformat to search for addresses from the
space-separated set of vCard files defined in
Feel free to create your own modules to query other database resources,
YP maps, and the like.
should be a good example of how to do it.
If you create your own modules or have other changes and feel that
they could be helpful for others, don't hesitate to submit them to the
author for inclusion in later releases.
Finally, to use
from mutt, add the following line to your
Most of the really interesting code of this program (namely, the RFC
822 address parser used by lbdb-fetchaddr) was stolen from Michael
Elkins' mutt mail user agent. Additional credits go to Brandon Long
for putting the query functionality into mutt.