LBDBQ(1)

NAME
lbdbq - query program for the little brother's database

SYNOPSIS
lbdbq something
lbdbq [-v|-h]

DESCRIPTION
lbdbq is the client program for the little brother's database. It will attempt to invoke various modules to gather information about persons matching something. 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 something@<various hosts>.

The behavior is configurable: Upon startup, lbdbq will source the shell scripts:
    /usr/local/etc/lbdb.rc
    $HOME/.lbdbrc
    $HOME/.lbdb/lbdbrc
    $HOME/.lbdb/rc
if they exist.

They can be used to set the following global variables:

MODULE_PATH
    a space separated list of directories, where lbdbq should look for modules.

METHODS
    a space separated list of the modules to use.

SORT_OUTPUT
    If you set this to false or no, 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 name, lbdbq sorts the output by real name. If you set this to address, lbdbq sorts the output by addresses (that's the default).

Note that there are defaults, so you should most probably modify these variables using constructs like this:
       MODULE_PATH="$MODULE_PATH $HOME/lbdb_modules"

Additionally, modules may have configuration variables of their own.

MODULES
Currently, the following modules are supplied with lbdb:

m_finger
    This module will use finger to find out something more about a person. The list of hosts do be asked is configurable; use the M_FINGER_HOSTS variable. Note that "localhost" will mean an invocation of your local finger(1) binary, and should thus work even if you don't provide the finger service to the network. m_finger tries to find out the machines mail domain name by parsing a sendmail.cf file (if it finds one) and by reading /etc/hostname and /etc/HOSTNAME.

m_inmail
    This module will look up user name fragments in a list of mail addresses created by lbdb-fetchaddr(1).

m_passwd
    This module searches for matching entries in your local /etc/passwd file. It evaluates the local machine mail domain in the same way m_finger does.

m_yppasswd
    This module searches for matching entries in the NIS password database using the command ``ypcat 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 pgp(1), pgpk(1), or gpg(1) to get the data.

m_fido
    This module searches your Fido nodelist, stored in $HOME/.lbdb/nodelist created by nodelist2lbdb(1).

m_abook
    This module uses the program abook(1), a text based address book application to search for addresses.

m_addr_email
    This module uses the program addr-email(1), a text based frontend to the Tk addressbook(1) application.

m_muttalias
    This module searches the variable MUTTALIAS_FILES (a space separated list) of files in MUTT_DIRECTORY that contain mutt aliases. File names without leading slash will have MUTT_DIRECTORY (defaults to $HOME/.mutt or $HOME, if $HOME/.mutt does not exist) prepended before the file name. Absolute file names (beginning with /) will be taken direct.

m_pine
    This module searches pine(1) addressbook files for aliases. To realize this it first inspects the variable PINERC. If it isn't set, the default `/etc/pine.conf /etc/pine.conf.fixed .pinerc' is used. To suppress inspecting the PINERC variable, set it to no. It than takes all address-book and global-address-book entries from these pinerc files and adds the contents of the variable PINE_ADDRESSBOOKS to the list, which defaults to `/etc/addressbook .addressbook'. Then these addressbooks are searched for aliases. All filenames without leading slash are searched in $HOME.

m_palm
    This module searches the Palm address database using the Palm::PDB(3pm) and Palm::Address(3pm) Perl modules from CPAN. It searches in the variable PALM_ADDRESS_DATABASE or if this isn't set in $HOME/.jpilot/AddressDB.pdb.

Feel free to create your own modules to query LDAP servers, YP maps, and the like. m_finger 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 lbdbq from mutt, add the following line to your $HOME/.muttrc:
    set query_command="lbdbq '%s'"

OPTIONS

-v  Print version number of lbdbq.

-h  Print short help of lbdbq.

FILES
/usr/local/etc/lbdb.rc
$HOME/.lbdbrc
$HOME/.lbdb/lbdbrc
$HOME/.lbdb/rc
/usr/local/libexec/*
$HOME/.lbdb/m_inmail.list
$HOME/.lbdb/nodelist

SEE ALSO
finger(1), ypcat(1), pgp(1), pgpk(1), gpg(1), mutt(1), lbdb-fetchaddr(1), nodelist2lbdb(1), abook(1), addr-email(1), addressbook(1), mutt(1), pine(1), Palm::PDB(3pm), Palm::Address(3pm).

CREDITS
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.

Many thanks to the authors of the several modules and extensions: Ross Campbell <rcampbel@us.oracle.com> (m_abook, m_yppasswd), Gabor Fleischer <flocsy@mtesz.hu> (m_pine), Dave Pearson <davep@davep.org> (m_palm, lbdb.el), and Brian Salter-Duke <b_duke@lacebark.ntu.edu.au> (m_muttalias)

AUTHOR
The lbdb package was written by Thomas Roessler <roessler@guug.de> and is now maintained and extended by Roland Rosenfeld <roland@spinnaker.de>.