1.\" Copyright (c) 1998 Sendmail, Inc. All rights reserved. 2.\" Copyright (c) 1988, 1991, 1993 3.\" The Regents of the University of California. All rights reserved. 4.\" 5.\" By using this file, you agree to the terms and conditions set 6.\" forth in the LICENSE file which can be found at the top level of 7.\" the sendmail distribution. 8.\" 9.\" 10.\" @(#)makemap.8 8.12 (Berkeley) 11/13/1998 11.\" 12.Dd November 16, 1992 13.Dt MAKEMAP 8 14.Os BSD 4.4 15.Sh NAME 16.Nm makemap 17.Nd create database maps for sendmail 18.Sh SYNOPSIS 19.Nm 20.Op Fl N 21.if \nP .Op Fl c Ar cachesize 22.Op Fl d 23.Op Fl f 24.if \nP .Op Fl l 25.Op Fl o 26.Op Fl r 27.Op Fl s 28.Op Fl v 29.Ar maptype 30.Ar mapname 31.Sh DESCRIPTION 32.Nm 33creates the database maps used by the keyed map lookups in 34.Xr sendmail 8 . 35It reads input from the standard input 36and outputs them to the indicated 37.Ar mapname . 38.Pp 39Depending on how it is compiled, 40.Nm 41handles up to three different database formats, 42selected using the 43.Ar maptype 44parameter. 45They may be 46.Bl -tag -width Fl 47.It Li dbm 48DBM format maps. 49This requires the 50.Xr ndbm 3 51library. 52.It Li btree 53B-Tree format maps. 54This requires the new Berkeley DB 55library. 56.It Li hash 57Hash format maps. 58This also requires the Berkeley DB 59library. 60.El 61.Pp 62In all cases, 63.Nm 64reads lines from the standard input consisting of two 65words separated by white space. 66The first is the database key, 67the second is the value. 68The value may contain 69``%\fIn\fP'' 70strings to indicated parameter substitution. 71Literal percents should be doubled 72(``%%''). 73Blank lines and lines beginning with ``#'' are ignored. 74.Ss Flags 75.Bl -tag -width Fl 76.It Fl N 77Include the null byte that terminates strings 78in the map. 79This must match the \-N flag in the sendmail.cf 80``K'' line. 81.if \nP \ 82\{\ 83.It Fl c 84Use the specified hash and B-Tree cache size. 85.\} 86.It Fl d 87Allow duplicate keys in the map. 88This is only allowed on B-Tree format maps. 89If two identical keys are read, 90they will both be inserted into the map. 91.It Fl f 92Normally all upper case letters in the key 93are folded to lower case. 94This flag disables that behaviour. 95This is intended to mesh with the 96\-f flag in the 97\fBK\fP 98line in sendmail.cf. 99The value is never case folded. 100.if \nP \ 101\{\ 102.It Fl l 103List supported map types. 104.\} 105.It Fl o 106Append to an old file. 107This allows you to augment an existing file. 108.It Fl r 109Allow replacement of existing keys. 110Normally 111.Nm 112complains if you repeat a key, 113and does not do the insert. 114.It Fl s 115Ignore safety checks on maps being created. 116This includes checking for hard or symbolic 117links in world writable directories. 118.It Fl v 119Verbosely print what it is doing. 120.El 121.Sh SEE ALSO 122.Xr sendmail 8 123.Sh HISTORY 124The 125.Nm 126command appeared in 127.Bx 4.4 . 128