163519Sbostic.\" Copyright (c) 1988, 1991, 1993
263519Sbostic.\"	The Regents of the University of California.  All rights reserved.
356844Seric.\"
456844Seric.\" %sccs.include.redist.man%
556844Seric.\"
6*67557Seric.\"     @(#)makemap.8	8.3 (Berkeley) 07/24/94
756844Seric.\"
863453Seric.Dd November 16, 1992
963453Seric.Dt MAKEMAP 8
1063453Seric.Os BSD 4.4
1163453Seric.Sh NAME
1263453Seric.Nm makemap
1363453Seric.Nd create database maps for sendmail
1463453Seric.Sh SYNOPSIS
1563453Seric.Nm
1663453Seric.Op Fl N
17*67557Seric.Op Fl d
1863453Seric.Op Fl f
1963453Seric.Op Fl o
2063453Seric.Op Fl r
2163453Seric.Op Fl v
2263453Seric.Ar maptype
2363453Seric.Ar mapname
2463453Seric.Sh DESCRIPTION
2563453Seric.Nm
2656844Sericcreates the database maps used by the keyed map lookups in
2763453Seric.Xr sendmail 8 .
2856844SericIt reads input from the standard input
2956844Sericand outputs them to the indicated
3063453Seric.Ar mapname .
3163453Seric.Pp
3256844SericDepending on how it is compiled,
3363453Seric.Nm
3456844Serichandles up to three different database formats,
3556844Sericselected using the
3663453Seric.Ar maptype
3756844Sericparameter.
3856844SericThey may be
3963453Seric.Bl -tag -width Fl
4063453Seric.It Li dbm
4156844SericDBM format maps.
4256844SericThis requires the
4363453Seric.Xr ndbm 3
4456844Sericlibrary.
4563453Seric.It Li btree
4656844SericB-Tree format maps.
4756844SericThis requires the new Berkeley
4863453Seric.Xr db 3
4956844Sericlibrary.
5063453Seric.It Li hash
5156844SericHash format maps.
5256844SericThis also requires the
5363453Seric.Xr db 3
5456844Sericlibrary.
5563453Seric.El
5663453Seric.Pp
5756844SericIn all cases,
5863453Seric.Nm
5956844Sericreads lines from the standard input consisting of two
6056844Sericwords separated by white space.
6156844SericThe first is the database key,
6256844Sericthe second is the value.
6356844SericThe value may contain
6456844Seric``%\fIn\fP''
6556844Sericstrings to indicated parameter substitution.
6656844SericLiteral parentheses should be doubled
6756844Seric(``%%'').
6856844SericBlank lines and lines beginning with ``#'' are ignored.
6963453Seric.Ss Flags
7063453Seric.Bl -tag -width Fl
7163453Seric.It Fl N
7256844SericInclude the null byte that terminates strings
7356844Sericin the map.
7456844SericThis must match the \-N flag in the sendmail.cf
7556844Seric``K'' line.
76*67557Seric.It Fl d
77*67557SericAllow duplicate keys in the map.
78*67557SericThis is only allowed on B-Tree format maps.
79*67557SericIf two identical keys are read,
80*67557Sericthey will both be inserted into the map.
8163453Seric.It Fl f
8264557SericNormally all upper case letters in the key
8364557Sericare folded to lower case.
8464557SericThis flag disables that behaviour.
8564557SericThis is intended to mesh with the
8657078Seric\-f flag in the
8763453Seric\fBK\fP
8857078Sericline in sendmail.cf.
8964557SericThe value is never case folded.
9063453Seric.It Fl o
9156844SericAppend to an old file.
9256844SericThis allows you to augment an existing file.
9363453Seric.It Fl r
9456844SericAllow replacement of existing keys.
9556844SericNormally
9663453Seric.Nm
9756844Sericcomplains if you repeat a key,
9856844Sericand does not do the insert.
9963453Seric.It Fl v
10056844SericVerbosely print what it is doing.
10163453Seric.El
10263453Seric.Sh SEE ALSO
10363453Seric.Xr sendmail 8
10463453Seric.Sh HISTORY
10563453SericThe
10663453Seric.Nm
10763453Sericcommand appeared in
10863453Seric.Bx 4.4 .
109