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