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*64557Seric.\"     @(#)makemap.8	8.2 (Berkeley) 09/22/93
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
1763453Seric.Op Fl f
1863453Seric.Op Fl o
1963453Seric.Op Fl r
2063453Seric.Op Fl v
2163453Seric.Ar maptype
2263453Seric.Ar mapname
2363453Seric.Sh DESCRIPTION
2463453Seric.Nm
2556844Sericcreates the database maps used by the keyed map lookups in
2663453Seric.Xr sendmail 8 .
2756844SericIt reads input from the standard input
2856844Sericand outputs them to the indicated
2963453Seric.Ar mapname .
3063453Seric.Pp
3156844SericDepending on how it is compiled,
3263453Seric.Nm
3356844Serichandles up to three different database formats,
3456844Sericselected using the
3563453Seric.Ar maptype
3656844Sericparameter.
3756844SericThey may be
3863453Seric.Bl -tag -width Fl
3963453Seric.It Li dbm
4056844SericDBM format maps.
4156844SericThis requires the
4263453Seric.Xr ndbm 3
4356844Sericlibrary.
4463453Seric.It Li btree
4556844SericB-Tree format maps.
4656844SericThis requires the new Berkeley
4763453Seric.Xr db 3
4856844Sericlibrary.
4963453Seric.It Li hash
5056844SericHash format maps.
5156844SericThis also requires the
5263453Seric.Xr db 3
5356844Sericlibrary.
5463453Seric.El
5563453Seric.Pp
5656844SericIn all cases,
5763453Seric.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.
6863453Seric.Ss Flags
6963453Seric.Bl -tag -width Fl
7063453Seric.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.
7563453Seric.It Fl f
76*64557SericNormally all upper case letters in the key
77*64557Sericare folded to lower case.
78*64557SericThis flag disables that behaviour.
79*64557SericThis is intended to mesh with the
8057078Seric\-f flag in the
8163453Seric\fBK\fP
8257078Sericline in sendmail.cf.
83*64557SericThe value is never case folded.
8463453Seric.It Fl o
8556844SericAppend to an old file.
8656844SericThis allows you to augment an existing file.
8763453Seric.It Fl r
8856844SericAllow replacement of existing keys.
8956844SericNormally
9063453Seric.Nm
9156844Sericcomplains if you repeat a key,
9256844Sericand does not do the insert.
9363453Seric.It Fl v
9456844SericVerbosely print what it is doing.
9563453Seric.El
9663453Seric.Sh SEE ALSO
9763453Seric.Xr sendmail 8
9863453Seric.Sh HISTORY
9963453SericThe
10063453Seric.Nm
10163453Sericcommand appeared in
10263453Seric.Bx 4.4 .
103