LBDBQ(1)
LBDBQ π (the query program for the little brother's database)
okay bestie, this is the manual page for lbdbq β it lives in the User Manuals section of the man pages, and it's genuinely iconic. buckle up. π
β¨ NAME β¨
lbdbq β the query program for the little brother's database π«Ά
β¨ SYNOPSIS β¨
lbdbq something
lbdbq [-v|--version|-h|--help]
like. two whole moods. you're either asking it for something or you're asking it who it is. π
β¨ DESCRIPTION β¨
so lbdbq is the client program for the little brother's database. its whole thing is that it tries to invoke a bunch of modules to gather info about people matching something. like, it might peek at a list of addresses you've gotten mail from, or it might look at YP maps, or it might literally try to finger something@<various hosts>. no cap, it's doing the most and we love that for it. π
the behavior is configurable: when it starts up, lbdbq will source these shell scripts:
/etc/lbdb.rc
$XDG_CONFIG_HOME/lbdb/config
$HOME/.lbdbrc
$HOME/.lbdb/lbdbrc
$HOME/.lbdb/rc
β but only if they exist. if they don't exist? it's not gonna stress about it. π
you can use those files to set the following global variables:
MODULES_PATHβ a space separated list of directories, wherelbdbqshould look for modules. πMETHODSβ a space separated list of the modules to use.SORT_OUTPUTβ okay this one has lore. if you set it tofalseorno,lbdbqwon't sort the addresses, but returns them in reverse order (which means the most recent address in them_inmaildatabase is first). if you set it toname,lbdbqsorts the output by real name. if you set it tocomment, it sorts the output by the comment (for example the date inm_inmail).reverse_commentdoes the same thing ascomment, but in reverse order, so the most recent timestamp ofm_inmailmay be on top. and if you setSORT_OUTPUTtoaddress,lbdbqsorts the output by addresses β and that's the default, fyi. πKEEP_DUPESβ if you set this totrueoryes,lbdbqwon't remove duplicate addresses that have different real name comment fields. it said "let them all in, they're valid." π
β οΈ heads up bestie: there are defaults, so you should most probably modify these variables using constructs like this:
MODULES_PATH="$MODULES_PATH $HOME/lbdb_modules"
also, modules can have configuration variables of their own. little guys with their own little settings. so cute. π
β¨ MODULES β¨
currently, the following modules are supplied with lbdb. there are a LOT of them and honestly? each one ate. π₯
m_fingerβ this module will usefingerto find out something more about a person. the list of hosts to be asked is configurable; use theM_FINGER_HOSTSvariable. note that"localhost"will mean an invocation of your localfinger(1)binary, and should thus work even if you don't provide the finger service to the network.m_fingertries to find out the machine's mail domain name in/etc/mailname, by parsing asendmail.cffile (if it finds one) and by reading/etc/hostnameand/etc/HOSTNAME. if you know that this fails on your machine, or you want to forcelbdbqto consider some other name to be the local mail domain name (misconfigured SUNs come to mind here π), you can specify a name using theMAIL_DOMAIN_NAMEvariable. if this variable is set by you, no probing will be done bylbdbq. periodt.m_inmailβ this module will look up user name fragments in a list of mail addresses created bylbdb-fetchaddr(1). by default this uses$XDG_DATA_HOME/lbdb/m_inmail.db, which is overridden if$HOME/.lbdb/m_inmail.utf-8exists (the old default) as its database file β but this can be changed using theINMAIL_DBvariable (but do not forget to change this in thelbdb-fetchaddr(1)call using option-f, too, bestie, or they'll be beefing). π«Άm_passwdβ this module searches for matching entries in your local/etc/passwdfile. it evaluates the local machine mail domain in the same waym_fingerdoes. if you setPASSWD_IGNORESYS=true, this module ignores all system accounts and only finds UIDs between1000and29999(all other UIDs are reserved on a Debian system). gatekeeping the system accounts, honestly valid. πm_yppasswdβ this module searches for matching entries in the NIS password database using the commandypcat passwd. π¦m_nispasswdβ this module searches for matching entries in the NIS+ password database using the commandniscat passwd.org_dir.m_getentβ this module searches for matching entries in whatever password database is configured using the commandgetent passwd. flexible icon.m_pgp2,m_pgp5,m_gpgβ these modules scan your PGP 2., PGP 5. or GnuPG public key ring for data. they use the programspgp(1),pgpk(1), orgpg(1)to get the data. the whole crypto crew showed up. πm_fidoβ this module searches your Fido nodelist, stored in$HOME/.lbdb/nodelistcreated bynodelist2lbdb(1).m_abookβ this module uses the programabook(1), a text based address book application, to search for addresses. you can define multiple abook address books by setting the variableABOOK_FILESto a space separated list. πm_goobookβ this module uses the programgoobook(1), a tool to access Google contacts via command line.m_addr_emailβ this module uses the programaddr-email(1), a text based frontend to the Tkaddressbook(1)application.m_muttaliasβ this module searches the variableMUTTALIAS_FILES(a space separated list) of files inMUTT_DIRECTORYthat contain mutt aliases. file names without a leading slash will haveMUTT_DIRECTORY(which defaults to$HOME/.mutt, or$HOMEif$HOME/.muttdoes not exist) prepended before the file name. absolute file names (beginning with/) will be taken direct. no editing required. β¨m_pineβ this module searchespine(1)addressbook files for aliases. to realize this it first inspects the variablePINERC. if it isn't set, the default`/etc/pine.conf /etc/pine.conf.fixed .pinerc'is used. to suppress inspecting thePINERCvariable, set it tono. it then takes alladdress-bookandglobal-address-bookentries from these pinerc files and adds the contents of the variablePINE_ADDRESSBOOKSto the list, which defaults to`/etc/addressbook .addressbook'. then these addressbooks are searched for aliases. all filenames without a leading slash are searched in$HOME.m_palmβ this module searches the Palm address database using thePalm::PDB(3pm)andPalm::Address(3pm)Perl modules from CPAN. it searches in the variablePALM_ADDRESS_DATABASEor, if this isn't set, in$HOME/.jpilot/AddressDB.pdb. π΄m_gnomecardβ this module searches for addresses in your GnomeCard database files. the variableGNOMECARD_FILESis a whitespace separated list of GnomeCard data files. if this variable isn't defined, the module searches in$HOME/.gnome/GnomeCardfor the GnomeCard database or at least falls back to$HOME/.gnome/GnomeCard.gcrd. if a filename does not start with a slash, it is prefixed with$HOME/. π§m_bbdbβ this module searches for addresses in your (X)Emacs BBDB (big brother database). it doesn't access~/.bbdbdirectly (yet) but callsemacs(1)orxemacs(1)with a special mode to get the information β so don't expect too much performance in this module, bestie. π you can configure theEMACSvariable to tell this module which emacsen to use. otherwise it will fall back toemacsorxemacs. the drama of it all.m_ldapβ this module queries an LDAP server using theNet::LDAP(3pm)Perl modules from CPAN. it can be configured using an external resource file/etc/lbdb_ldap.rcor$XDG_CONFIG_HOME/lbdb/ldap.rcor$HOME/.lbdb/ldap.rcor$HOME/.mutt_ldap_query.rc. you can explicitly define a LDAP query in this file, or you can use one or more of the predefined queries from the%ldap_server_dbin this file. for this you have to define a space separated list of nicknames from entries in the variableLDAP_NICKS.m_wanderlustβ this module searches for addresses stored in your$WANDERLUST_ADDRESSES(or by default in$HOME/.addresses) file, an addressbook of WanderLust. πm_osx_addressbookβ this module queries the OS X AddressBook. it is only available on OS X systems. sorry to everyone else, it's exclusive. πm_evolutionβ this module queries the Ximian Evolution address book. it depends on the programevolution-addressbook-export, which is shipped with evolution.m_vcfβ this module uses a bundled little perl program namedvcqueryto search for addresses from the space-separated set of vCard files defined in$VCF_FILES. a whole little guy in there. πm_khardβ this module searches a CardDAV address book viakhard(1).m_muβ this module uses the programmu-cfind(1), which searches in the index file generated by themutool. you can filter the results with the variablesMU_AFTER(the number of seconds since1970-01-01 UTC) andMU_PERSONAL(set totrueoryes, and remember to invokemu-index(1)with--my-address). π«Άm_notmuch_addrlookupβ this module uses the programnotmuch-addrlookup(1), which searches thenotmuch(1)index for mail addresses.
feel free to create your own modules to query other database resources, YP maps, and the like. m_finger should be a good example of how to do it. go off, build your own. π₯
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. sharing is caring, bestie. π«Ά
finally, to use lbdbq from mutt, add the following line to your $HOME/.muttrc:
set query_command="lbdbq %s"
β¨ OPTIONS β¨
-v|--versionβ print the version number oflbdbq. like "who even are you." π-h|--helpβ print short help oflbdbq. your little cheat sheet. π
β¨ FILES β¨
/etc/lbdb.rc$XDG_CONFIG_HOME/lbdb/config$HOME/.lbdbrc$HOME/.lbdb/lbdbrc$HOME/.lbdb/rc/usr/libexec/lbdb/*$XDG_DATA_HOME/lbdb/m_inmail.db$HOME/.lbdb/m_inmail.utf-8$HOME/.lbdb/nodelist
β¨ SEE ALSO β¨
finger(1), ypcat(1), niscat(1), getent(1), pgp(1), pgpk(1), gpg(1), lbdb-fetchaddr(1), nodelist2lbdb(1), mutt_ldap_query(1), abook(1), goobook(1), addr-email(1), addressbook(1), mutt(1), pine(1), emacs(1), xemacs(1), Palm::PDB(3pm), Palm::Address(3pm), Net::LDAP(3pm), khard(1), mu-cfind(1), notmuch-addrlookup(1)
the whole squad is linked in. iykyk. π
π CREDITS π
Okay bestie, storytime: most of the genuinely interesting code in this program β namely the RFC 822 address parser that lbdb-fetchaddr uses β was stolen from Michael Elkins' mutt mail user agent. Iconic behaviour honestly. Extra credits go to Brandon Long for dropping the query functionality into mutt. π
And a huge slay to everyone who wrote the modules and extensions, because they ate and left no crumbs:
- Ross Campbell
<rcampbel@us.oracle.com>βm_abook,m_yppasswdπ - Marc de Courville
<marc@courville.org>βm_ldap,mutt_ldap_queryβ¨ - Brendan Cully
<brendan@kublai.com>βm_osx_addressbook,m_vcfπ¦ - Gabor Fleischer
<flocsy@mtesz.hu>βm_pineπΈ - Rick Frankel
<rick@rickster.com>βm_gnomecardπ - Utz-Uwe Haus
<haus@uuhaus.de>βm_bbdb,m_nispasswdβ - Torsten Jerzembeck
<toje@nightingale.ms.sub.org>βm_addr_emailπ - Adrian Likins
<alikins@redhat.com>βm_getentπ₯ - Gergely Nagy
<algernon@debian.org>βm_wanderlustπ§ - Dave Pearson
<davep@davep.org>βm_palm,lbdb.elπ - Brian Salter-Duke
<b_duke@bigpond.net.au>βm_muttaliasπ - FranΓ§ois Charlier
<fcharlier@ploup.net>βm_goobookπ - Colin Watson
<cjwatson@debian.org>βm_khardπ - gregor herrmann
<gregoa@debian.org>βm_notmuch_addrlookupπ
the way that one package pulled in this many absolute legends?? no cap, we're all just standing on their shoulders fr fr.
π AUTHOR π
The lbdb package was initially written by Thomas Roessler <roessler@guug.de>, and is now maintained and heavily extended by Roland Rosenfeld <roland@spinnaker.de>. Main character energy from start to finish, honestly. π«
That's the whole page, bestie! π This lil' beauty lives in the Unix manual section, dated June 2025, and goes by LBDBQ(1) β so if you ever forget any of it, just hit up that manual page and it'll have your back. Now go look up some addresses, you absolute icon π
β¨π«Ά
π¦ where this page comes from
- ubuntu resolute: lbdb 0.57-1 Β· GPL-2.0-or-later
- ubuntu stonking: lbdb 0.57-1 Β· GPL-2.0-or-later
- Copyright (c) 1998-2025 Roland Rosenfeld <roland@spinnaker.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms