


MKDBM(8)                                                 MKDBM(8)


NNAAMMEE
       mkdbm - build a DBM file suitable for use by smail

SSYYNNOOPPSSIISS
       //uussrr//lliibb//mmaaiill//mmkkddbbmm [ --ff ] [ --vv ] [ --nn ] [ --dd ] [ --yy ]
                 [ --oo _o_u_t_p_u_t_-_n_a_m_e ] [ _f_i_l_e ...  ]

DDEESSCCRRIIPPTTIIOONN
       _M_k_d_b_m  takes  lines  as  input and writes them to a set of
       files in the  format  produced  by  the  _d_b_m(3X)  function
       library.  The key is formed 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.  If --ff  is  given,  the
       key  is  folded  to  lower case before being stored in the
       database.

       If no input files are specified,  the  standard  input  is
       read.  In addition, if a filename of -- is given, the stan-
       dard input is inserted at that point.

       The --oo option sets the name for the DBM database.  If  not
       specified  explicitly,  the  name of the database is taken
       from the first _f_i_l_e argument.  If no  _f_i_l_e  arguments  are
       given,  or the first file argument is -- then a database is
       created in the current directory with the name _d_b_m.

       The _m_k_d_b_m program can be used to produce DBM  files  which
       can  then be read by a _s_m_a_i_l(8) pathalias router or alias-
       file director.  The router or directory should be  config-
       ured  to  use  the _d_b_m file access protocol.  See _s_m_a_i_l(5)
       for more information on routers and directors.   For  some
       databases,  _m_k_l_i_n_e(8)  should  be used to form single line
       records with comments and extra white-space removed.

       The generated database contains a single nul byte  at  the
       end  of each key and value.  Also a single record contain-
       ing ``@'' as a key and value is created for  compatibility
       with  the Berkeley _s_e_n_d_m_a_i_l(8) program's alias files.  The
       ending nul bytes can be suppressed with the --nn option, and
       the  extra  ``@''  record  can  be  suppressed with the --dd
       option.  Use of --nn is incompatible with the smail ddbbmm file
       access method.

       When  creating the database, temporary DBM files are built
       in the same directory as the eventual output files.  Then,
       when  it  is  completed,  any DBM files currently existing
       under the target name are removed,  _m_k_d_b_m  sleeps  between
       one  and two seconds, and then the temporary DBM files are
       moved to the target names.  This database creation  method
       is not compatible with the locking method used by Berkeley
       _s_e_n_d_m_a_i_l.

       If the --vv flags is specified _m_k_d_b_m  writes  statistics  to



Local                    31 January 1988                        1





MKDBM(8)                                                 MKDBM(8)


       the standard output.

       The  --yy  flag  is  used to create YP-compatible dbm files.
       This obviates the need  for  keeping  sendmail  around  to
       recreate  the  YP  alias database.  Calling _m_k_d_b_m with the
       arguments --yynndd generates dbm  files  that  are  compatible
       with  regular  YP  databases.   Using just the argument --yy
       generates a  database  that  is  compatible  with  the  YP
       mail.alias database.

EEXXAAMMPPLLEE
       As  an example of the use of _m_k_d_b_m consider a file, _p_a_t_h_s,
       containing 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 _m_k_d_b_m _-_f _p_a_t_h_s will produce a
       dbm database in the files _p_a_t_h_s_._p_a_g and _p_a_t_h_s_._d_i_r contain-
       ing the above entries, with downcased keys.  For  example,
       one  entry will contain the key _s_t_a_r_g_a_t_e_._c_o_m with an asso-
       ciated value of _a_m_e_s_!_c_m_c_l_2_!_u_i_u_c_d_c_s_!_s_t_a_r_g_a_t_e_!_%_s.

SSEEEE AALLSSOO
       _m_k_a_l_i_a_s_e_s(8), _m_k_l_i_n_e(8),  _m_k_s_o_r_t(8),  _s_m_a_i_l(5),  _s_m_a_i_l(8),
       _p_a_t_h_a_l_i_a_s(8).

FFIILLEESS
       dbmXXXXXX.pag
       dbmXXXXXX.dir    The  temporary  files created in the same
                        directory as the eventual output files.

CCOOPPYYRRIIGGHHTT
       Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll
       Copyright(C)1992 Ronald S. Karr
       See  a  file COPYING, distributed with the source code, or
       type _s_m_a_i_l _-_b_c for distribution  rights  and  restrictions
       associated with this software.
















Local                    31 January 1988                        2


