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