1.\" Copyright (c) 1988, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)makemap.8	8.2 (Berkeley) 9/22/93
33.\"
34.Dd November 16, 1992
35.Dt MAKEMAP 8
36.Os BSD 4.4
37.Sh NAME
38.Nm makemap
39.Nd create database maps for sendmail
40.Sh SYNOPSIS
41.Nm
42.Op Fl N
43.Op Fl f
44.Op Fl o
45.Op Fl r
46.Op Fl v
47.Ar maptype
48.Ar mapname
49.Sh DESCRIPTION
50.Nm
51creates the database maps used by the keyed map lookups in
52.Xr sendmail 8 .
53It reads input from the standard input
54and outputs them to the indicated
55.Ar mapname .
56.Pp
57Depending on how it is compiled,
58.Nm
59handles up to three different database formats,
60selected using the
61.Ar maptype
62parameter.
63They may be
64.Bl -tag -width Fl
65.It Li dbm
66DBM format maps.
67This requires the
68.Xr ndbm 3
69library.
70.It Li btree
71B-Tree format maps.
72This requires the new Berkeley
73.Xr db 3
74library.
75.It Li hash
76Hash format maps.
77This also requires the
78.Xr db 3
79library.
80.El
81.Pp
82In all cases,
83.Nm
84reads lines from the standard input consisting of two
85words separated by white space.
86The first is the database key,
87the second is the value.
88The value may contain
89``%\fIn\fP''
90strings to indicated parameter substitution.
91Literal parentheses should be doubled
92(``%%'').
93Blank lines and lines beginning with ``#'' are ignored.
94.Ss Flags
95.Bl -tag -width Fl
96.It Fl N
97Include the null byte that terminates strings
98in the map.
99This must match the \-N flag in the sendmail.cf
100``K'' line.
101.It Fl f
102Normally all upper case letters in the key
103are folded to lower case.
104This flag disables that behaviour.
105This is intended to mesh with the
106\-f flag in the
107\fBK\fP
108line in sendmail.cf.
109The value is never case folded.
110.It Fl o
111Append to an old file.
112This allows you to augment an existing file.
113.It Fl r
114Allow replacement of existing keys.
115Normally
116.Nm
117complains if you repeat a key,
118and does not do the insert.
119.It Fl v
120Verbosely print what it is doing.
121.El
122.Sh SEE ALSO
123.Xr sendmail 8
124.Sh HISTORY
125The
126.Nm
127command appeared in
128.Bx 4.4 .
129