COHERENT manpages
This page displays the COHERENT manpage for mkdbm [Build a data base for smail].
List of available manpages
Index
mkdbm -- Command Build a data base for smail /usr/lib/mail/mkdbm [-d] [-f] [-n] [-o output-file] [-v] [-y] [file ...] The command mkdbm generates a data base for smail. It forms the data key from the characters up to, but not including, a colon (`:') or white-space character. The data after the colon or white-space character forms the value associated with the key. You can use mkdbm to produce data-base files that can then be read by a smail router pathalias or its director alias-file. By default, the router and director are configured to use the DBM file-access protocol. (For information on routers and directors, see the Lexicon entries for routers and directors.) For some data bases, you can use mkline to form single-line records whose comments and extra white space are removed. The generated data base contains a single NUL character at the end of each key and value. It also generates a single record that contains a `@' as a key and value; it does so for compatibility with the Berkeley sendmail command's alias files. mkdbm recognizes the following command-line options: -d Suppress writing the extra `@' record. -f Fold the key to lower case before storing it within the data base. -n Suppress writing a NUL character at the end of each line. Please note that this option is incompatible with smail's method of accessing the data-base file. -o output-file Write output into output-file. This option also sets the name for the data base. If you do not use this option, mkdbm names the output data base after its first file argument. If, in addition, the command line does not name an input file, mkmf names the output file dbm. -v Write statistics to the standard output. -y Create an output file that is compatible with the Sun Yellow Pages (YP) system. This obviates the need for keeping a copy of sendmail on your system to maintain a YP-alias data base. If its command line does not name an input file, mkdbm reads the standard input. mkdbm also reads the standard input if a file is named `-'; in this way, it can mix data read from the standard input with material read from files. Calling mkdbm with the arguments -ynd generates a data base that is compatible with regular YP data bases. Using just the argument -y generates a data base that is compatible with the YP mail.alias data base. As it creates the data base, mkdbm builds temporary files in the same directory in which it eventually builds the output files. When it has completed its work, mkdbm removes all data-base files that have the target name, sleeps for one or two seconds, then moves the newly written temporary data-base files to the target names. This method of writing a data-base is not compatible with the locking method used by Berkeley command sendmail. Example As an example of the use of mkdbm consider a file named paths, which contains the routing information: .COM sun!%s Stargate.COM ames!cmcl2!uiucdcs!stargate!%s ames ames!%s .ATT.COM mtune!%s mtune mtune!%s Given this file, the command mkdbm -f paths produces a data base in the files paths.pag and paths.dir that contains the above entries but with the keys shifted into lower case. For example, one entry will contain the key stargate.com with an associated value of: ames!cmcl2!uiucdcs!stargate!%s Files dbmXXXXXX.pag dbmXXXXXX.dir Temporary files, created in the same directory as the output files. See Also commands, libgdbm, mail [overview], mkline, pathalias, smail Notes Copyright © 1987, 1988 Ronald S. Karr and Landon Curt Noll. Copyright © 1992 Ronald S. Karr. mkdbm is part of the smail package. For a full copyright statement, see file COPYING, which is included with source code to smail, or type smail -bc to see the distribution rights and restrictions associated with this software.