Debian Codegraph @

upstream/debian-unstable/man8/editmap.8

raw
1 .\" Copyright (c) 2000-2001, 2003 Proofpoint, Inc. and its suppliers.
2 .\" All rights reserved.
3 .\"
4 .\" By using this file, you agree to the terms and conditions set
5 .\" forth in the LICENSE file which can be found at the top level of
6 .\" the sendmail distribution.
7 .\"
8 .\"
9 .\" $Id: editmap.8,v 1.10 2013-11-22 20:51:26 ca Exp $
10 .\"
11 .TH EDITMAP 8 "$Date: 2013-11-22 20:51:26 $"
12 .SH NAME
13 .B editmap
14 \- query and edit single records in database maps for sendmail
15 .SH SYNOPSIS
16 .B editmap
17 .RB [ \-C
18 .IR file ]
19 .RB [ \-N ]
20 .RB [ \-f ]
21 .RB [ \-q|\-u|\-x ]
22 maptype mapname
23 key [ "value ..." ]
24 .SH DESCRIPTION
25 .B Editmap
26 queries or edits one record in database maps used by the keyed map lookups in
27 sendmail(8).
28 Arguments are passed on the command line and output (for queries) is
29 directed to standard output.
30 .PP
31 Depending on how it is compiled,
32 .B editmap
33 handles different database formats,
34 selected using the
35 .I maptype
36 parameter.
37 They may be
38 .TP
39 dbm
40 DBM format maps.
41 This requires the
42 ndbm(3)
43 library.
44 .TP
45 btree
46 B-Tree format maps.
47 This requires the new Berkeley DB
48 library.
49 .TP
50 hash
51 Hash format maps.
52 This also requires the Berkeley DB
53 library.
54 .TP
55 cdb
56 CDB (Constant DataBase) format maps.
57 This requires the tinycdb library.
58 .PP
59 If the
60 .I TrustedUser
61 option is set in the sendmail configuration file and
62 .B editmap
63 is invoked as root, the generated files will be owned by
64 the specified
65 .IR TrustedUser.
66 .SS Flags
67 .TP
68 .B \-C
69 Use the specified
70 .B sendmail
71 configuration file for looking up the TrustedUser option.
72 .TP
73 .B \-N
74 Include the null byte that terminates strings
75 in the map (for alias maps).
76 .TP
77 .B \-f
78 Normally all upper case letters in the key
79 are folded to lower case.
80 This flag disables that behaviour.
81 This is intended to mesh with the
82 \-f flag in the
83 .B K
84 line in sendmail.cf.
85 The value is never case folded.
86 .TP
87 .B \-q
88 Query the map for the specified key. If found, print value to standard
89 output and exit with 0. If not found then print an error
90 message to stdout and exit with EX_UNAVAILABLE.
91 .TP
92 .B \-u
93 Update the record for
94 .I key
95 with
96 .I value
97 or inserts a new record if one doesn't exist. Exits with 0 on success
98 or EX_IOERR on failure.
99 .TP
100 .B \-x
101 Deletes the specific key from the map. Exits with 0 on success or
102 EX_IOERR on failure.
103 .TP
104 .SH SEE ALSO
105 sendmail(8),
106 makemap(8)
107 .SH HISTORY
108 The
109 .B editmap
110 command has no history.