EXIM_DBMBUILD(8)

πŸ“¦
version 4.99.4 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– EXIM_DBMBUILD β€” the build-a-DBM-file girlie πŸ’–

okay bestie, so this is the page for exim_dbmbuild, which lives in section 8 of the System Manager's Manual. it's the tool that makes your DBM files, and honestly? she's iconic. let's get into it πŸ¦‹


✨ NAME ✨

exim_dbmbuild β€” Build a DBM file. that's it, that's the whole job, and she does it well πŸ’…


✨ SYNOPSIS ✨

exim_dbmbuild [-nolc] [-nozero] [-noduperr] [-nowarn] [inputfile | -]
outputfile

✨ DESCRIPTION ✨

so here's the vibe πŸŽ€ β€” exim_dbmbuild reads an input file that's got keys and data in the same format that the lsearch lookup uses (peep section 9.1 for that). then it writes out a DBM file where the lower-cased alias names are the keys and the rest of the info is the data. not a fan of the lower-casing? no worries, just call the program with -nolc and she'll leave your case alone πŸ’–

now, a terminating zero gets included as part of the key string. that's what the dbm lookup type expects, no cap. BUT 🫢 if you hand her the -nozero option, exim_dbmbuild will create files with no terminating zeroes in either the key strings or the data strings. and for files like that, you'd use the dbmnz lookup type. iykyk ✨

she needs two arguments, bestie: the name of the input file (and yes, a single hyphen - means "read from standard input", cute right?), plus the name of the output file. she creates the output under a temporary name and then renames it β€” but only if everything went well 🌸.

⚠️ here's the tea though: if the native DB interface is in use (USE_DB is set in a compile-time configuration file β€” and this is super common in free versions of Unix), then those two file names must be different. why? because in this mode the Berkeley DB functions create a single output file using exactly the name you gave. no suffix, no extras. so they cannot be the same, periodt.

like, for example:

exim_dbmbuild /etc/aliases /etc/aliases.db

that reads the system alias file and creates a DBM version of it in /etc/aliases.db. slay πŸ”₯

now on systems that use the ndbm routines (mostly the proprietary versions of Unix), two files are used, with the suffixes .dir and .pag. in that environment, those suffixes get added to the second argument of exim_dbmbuild, which means it's totally fine for it to be the same as the first one πŸ‘‘. same deal when the Berkeley functions are used in compatibility mode β€” though ngl, that's not recommended β€” because in that case it adds a .db suffix to the file name.


πŸ¦‹ duplicate keys & the options that handle them πŸ¦‹

if a duplicate key shows up, the program outputs a warning, and when it finishes its return code is 1 rather than zero β€” unless you used the -noduperr option. πŸ™ˆ

by default, only the first of a set of duplicates gets used β€” this makes it compatible with lsearch lookups. but there's an option -lastdup which makes it use the data for the last duplicate instead. and there's also -nowarn, which stops it listing duplicate keys to stderr πŸ’œ

for other errors β€” the kind where it doesn't actually make a new file at all β€” the return code is 2. 😭


πŸŽ€ BUGS πŸŽ€

sooo this manual page needs a major re-work, fr fr. if somebody knows better groff than us and has more experience in writing manual pages, any patches would be greatly appreciated πŸ₯ΊπŸ«Ά (this is genuinely in the original, we're just being honest)


🌈 SEE ALSO 🌈

  • exim(8)
  • /usr/share/doc/exim4-base/

πŸ’– AUTHOR πŸ’–

this manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system (but may be used by others). we love that for him ✨


and that's the whole page, bestie!! πŸ’… this came out of the System Manager's Manual, dated March 26, 2003 β€” yeah, she's an elder icon but she still ate πŸ‘‘πŸ’– EXIM_DBMBUILD(8), mwah, bye!! πŸ¦‹πŸŒΈ