156844Seric.\" Copyright (c) 1988, 1991 The Regents of the University of California.
256844Seric.\" All rights reserved.
356844Seric.\"
456844Seric.\" %sccs.include.redist.man%
556844Seric.\"
6*63453Seric.\"     @(#)makemap.8	6.2 (Berkeley) 06/16/93
756844Seric.\"
8*63453Seric.Dd November 16, 1992
9*63453Seric.Dt MAKEMAP 8
10*63453Seric.Os BSD 4.4
11*63453Seric.Sh NAME
12*63453Seric.Nm makemap
13*63453Seric.Nd create database maps for sendmail
14*63453Seric.Sh SYNOPSIS
15*63453Seric.Nm
16*63453Seric.Op Fl N
17*63453Seric.Op Fl f
18*63453Seric.Op Fl o
19*63453Seric.Op Fl r
20*63453Seric.Op Fl v
21*63453Seric.Ar maptype
22*63453Seric.Ar mapname
23*63453Seric.Sh DESCRIPTION
24*63453Seric.Nm
2556844Sericcreates the database maps used by the keyed map lookups in
26*63453Seric.Xr sendmail 8 .
2756844SericIt reads input from the standard input
2856844Sericand outputs them to the indicated
29*63453Seric.Ar mapname .
30*63453Seric.Pp
3156844SericDepending on how it is compiled,
32*63453Seric.Nm
3356844Serichandles up to three different database formats,
3456844Sericselected using the
35*63453Seric.Ar maptype
3656844Sericparameter.
3756844SericThey may be
38*63453Seric.Bl -tag -width Fl
39*63453Seric.It Li dbm
4056844SericDBM format maps.
4156844SericThis requires the
42*63453Seric.Xr ndbm 3
4356844Sericlibrary.
44*63453Seric.It Li btree
4556844SericB-Tree format maps.
4656844SericThis requires the new Berkeley
47*63453Seric.Xr db 3
4856844Sericlibrary.
49*63453Seric.It Li hash
5056844SericHash format maps.
5156844SericThis also requires the
52*63453Seric.Xr db 3
5356844Sericlibrary.
54*63453Seric.El
55*63453Seric.Pp
5656844SericIn all cases,
57*63453Seric.Nm
5856844Sericreads lines from the standard input consisting of two
5956844Sericwords separated by white space.
6056844SericThe first is the database key,
6156844Sericthe second is the value.
6256844SericThe value may contain
6356844Seric``%\fIn\fP''
6456844Sericstrings to indicated parameter substitution.
6556844SericLiteral parentheses should be doubled
6656844Seric(``%%'').
6756844SericBlank lines and lines beginning with ``#'' are ignored.
68*63453Seric.Ss Flags
69*63453Seric.Bl -tag -width Fl
70*63453Seric.It Fl N
7156844SericInclude the null byte that terminates strings
7256844Sericin the map.
7356844SericThis must match the \-N flag in the sendmail.cf
7456844Seric``K'' line.
75*63453Seric.It Fl f
7657078SericFold all upper case letters in the key
7757078Sericto lower case;
7857078Sericthis is intended to mesh with the
7957078Seric\-f flag in the
80*63453Seric\fBK\fP
8157078Sericline in sendmail.cf.
8257078SericThe value is not case folded.
83*63453Seric.It Fl o
8456844SericAppend to an old file.
8556844SericThis allows you to augment an existing file.
86*63453Seric.It Fl r
8756844SericAllow replacement of existing keys.
8856844SericNormally
89*63453Seric.Nm
9056844Sericcomplains if you repeat a key,
9156844Sericand does not do the insert.
92*63453Seric.It Fl v
9356844SericVerbosely print what it is doing.
94*63453Seric.El
95*63453Seric.Sh SEE ALSO
96*63453Seric.Xr sendmail 8
97*63453Seric.Sh HISTORY
98*63453SericThe
99*63453Seric.Nm
100*63453Sericcommand appeared in
101*63453Seric.Bx 4.4 .
102