Initial import from FreeBSD RELENG_4:
[games.git] / contrib / sendmail / makemap / makemap.8
1 .\" Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
2 .\"      All rights reserved.
3 .\" Copyright (c) 1988, 1991, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" By using this file, you agree to the terms and conditions set
7 .\" forth in the LICENSE file which can be found at the top level of
8 .\" the sendmail distribution.
9 .\"
10 .\"
11 .\"     $Id: makemap.8,v 8.29 2001/10/10 03:23:02 ca Exp $
12 .\"
13 .TH MAKEMAP 8 "$Date: 2001/10/10 03:23:02 $"
14 .SH NAME
15 makemap
16 \- create database maps for sendmail
17 .SH SYNOPSIS
18 .B makemap
19 .RB [ \-C
20 .IR file ]
21 .RB [ \-N ]
22 .RB [ \-c
23 .IR cachesize ]
24 .RB [ \-d ]
25 .RB [ \-e ]
26 .RB [ \-f ]
27 .RB [ \-l ]
28 .RB [ \-o ]
29 .RB [ \-r ]
30 .RB [ \-s ]
31 .RB [ \-t
32 .IR delim ]
33 .RB [ \-u ]
34 .RB [ \-v ]
35 .I 
36 maptype mapnam
37 .SH DESCRIPTION
38 .B Makemap
39 creates the database maps used by the keyed map lookups in
40 sendmail(8).  
41 It reads input from the standard input
42 and outputs them to the indicated
43 .I mapname.
44 .PP
45 Depending on how it is compiled,
46 .B makemap
47 handles up to three different database formats, 
48 selected using the
49 .I maptype
50 parameter.  
51 They may be
52 .TP
53 dbm
54 DBM format maps.  
55 This requires the 
56 ndbm(3) 
57 library.
58 .TP
59 btree
60 B-Tree format maps.  
61 This requires the new Berkeley DB 
62 library.
63 .TP
64 hash
65 Hash format maps.  
66 This also requires the Berkeley DB 
67 library.
68 .PP
69 In all cases,
70 .B makemap
71 reads lines from the standard input consisting of two 
72 words separated by white space.  
73 The first is the database key, 
74 the second is the value.  
75 The value may contain 
76 ``%\fIn\fP'' 
77 strings to indicate parameter substitution.  
78 Literal percents should be doubled 
79 (``%%'').
80 Blank lines and lines beginning with ``#'' are ignored.
81 .PP
82 Notice: do
83 .B not
84 use
85 .B makemap
86 to create the aliases data base, but
87 .B newaliases
88 which puts a special token into the data base that is required by
89 .B sendmail.
90 .PP
91 If the
92 .I TrustedUser
93 option is set in the sendmail configuration file and
94 .B makemap
95 is invoked as root, the generated files will be owned by 
96 the specified
97 .IR TrustedUser.
98 .SS Flags
99 .TP  
100 .B \-C
101 Use the specified
102 .B sendmail
103 configuration file for looking up the TrustedUser option.
104 .TP 
105 .B \-N
106 Include the null byte that terminates strings 
107 in the map.  
108 This must match the \-N flag in the sendmail.cf 
109 ``K'' line.
110 .TP
111 .B \-c
112 Use the specified hash and B-Tree cache size.
113 .TP
114 .B \-d
115 Allow duplicate keys in the map.  
116 This is only allowed on B-Tree format maps.  
117 If two identical keys are read, 
118 they will both be inserted into the map.
119 .TP
120 .B \-e
121 Allow empty value (right hand side).
122 .TP
123 .B \-f
124 Normally all upper case letters in the key 
125 are folded to lower case.  
126 This flag disables that behaviour.  
127 This is intended to mesh with the 
128 \-f flag in the 
129 .B K 
130 line in sendmail.cf.  
131 The value is never case folded.
132 .TP
133 .B \-l
134 List supported map types.
135 .TP
136 .B \-o
137 Append to an old file.  
138 This allows you to augment an existing file.
139 .TP
140 .B \-r
141 Allow replacement of existing keys.  
142 Normally
143 .B makemap
144 complains if you repeat a key, 
145 and does not do the insert.
146 .TP
147 .B \-s
148 Ignore safety checks on maps being created.  
149 This includes checking for hard or symbolic 
150 links in world writable directories.
151 .TP
152 .B \-t
153 Use the specified delimiter instead of white space.
154 .TP
155 .B \-u
156 dump (unmap) the content of the database to standard output.
157 .TP
158 .B \-v
159 Verbosely print what it is doing.
160 .SH SEE ALSO
161 sendmail(8), newaliases(1)
162 .SH HISTORY
163 The
164 .B makemap
165 command appeared in 
166 4.4BSD.