Debian Codegraph @

upstream/opensuse-tumbleweed/man8/makemap.8

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