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