]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/sendmail/makemap/makemap.8
Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details
[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 [ \-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 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 .TP
71 cdb
72 CDB (Constant DataBase) format maps.  
73 This requires the tinycdb library.
74 .TP
75 implicit
76 The first available format in the following order:
77 hash, dbm, and cdb.
78 .PP
79 In all cases,
80 .B makemap
81 reads lines from the standard input consisting of two 
82 words separated by white space.  
83 The first is the database key, 
84 the second is the value.  
85 The value may contain 
86 ``%\fIn\fP'' 
87 strings to indicate parameter substitution.  
88 Literal percents should be doubled 
89 (``%%'').
90 Blank lines and lines beginning with ``#'' are ignored.
91 .PP
92 Notice: do
93 .B not
94 use
95 .B makemap
96 to create the aliases data base, but
97 .B newaliases
98 which puts a special token into the data base that is required by
99 .B sendmail.
100 .PP
101 If the
102 .I TrustedUser
103 option is set in the sendmail configuration file and
104 .B makemap
105 is invoked as root, the generated files will be owned by 
106 the specified
107 .IR TrustedUser.
108 .SS Flags
109 .TP  
110 .B \-C
111 Use the specified
112 .B sendmail
113 configuration file for looking up the TrustedUser option.
114 .TP 
115 .B \-N
116 Include the null byte that terminates strings 
117 in the map.  
118 This must match the \-N flag in the sendmail.cf 
119 ``K'' line.
120 .TP
121 .B \-c
122 Use the specified hash and B-Tree cache size.
123 .TP
124 .B \-D
125 Use to specify the character to use to indicate a comment (which is ignored)
126 instead of the default of '#'.
127 .TP
128 .B \-d
129 Allow duplicate keys in the map.  
130 This is only allowed on B-Tree format maps.  
131 If two identical keys are read, 
132 they will both be inserted into the map.
133 .TP
134 .B \-e
135 Allow empty value (right hand side).
136 .TP
137 .B \-f
138 Normally all upper case letters in the key 
139 are folded to lower case.  
140 This flag disables that behaviour.  
141 This is intended to mesh with the 
142 \-f flag in the 
143 .B K 
144 line in sendmail.cf.  
145 The value is never case folded.
146 .TP
147 .B \-l
148 List supported map types.
149 .TP
150 .B \-o
151 Append to an old file.  
152 This allows you to augment an existing file.
153 Note: this might not be supported by all database types,
154 e.g., cdb.
155 .TP
156 .B \-r
157 Allow replacement of existing keys.  
158 Normally
159 .B makemap
160 complains if you repeat a key, 
161 and does not do the insert.
162 .TP
163 .B \-s
164 Ignore safety checks on maps being created.  
165 This includes checking for hard or symbolic 
166 links in world writable directories.
167 .TP
168 .B \-t
169 Use the specified delimiter instead of white space
170 (also for dumping a map).
171 .TP
172 .B \-u
173 dump (unmap) the content of the database to standard output.
174 .TP
175 .B \-v
176 Verbosely print what it is doing.
177 .P
178 .SH Example
179 makemap hash /etc/mail/access < /etc/mail/access
180 .SH SEE ALSO
181 sendmail(8), newaliases(1)
182 .SH HISTORY
183 The
184 .B makemap
185 command appeared in 
186 4.4BSD.