Merge from vendor branch CVS:
[dragonfly.git] / contrib / sendmail-8.13.4 / editmap / editmap.8
1 .\" Copyright (c) 2000-2001, 2003 Sendmail, 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.9 2003/02/01 17:07:42 ca Exp $
10 .\"
11 .TH EDITMAP 8 "$Date: 2003/02/01 17:07:42 $"
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 up to three 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 .PP
55 If the
56 .I TrustedUser
57 option is set in the sendmail configuration file and
58 .B editmap
59 is invoked as root, the generated files will be owned by
60 the specified
61 .IR TrustedUser.
62 .SS Flags
63 .TP
64 .B \-C
65 Use the specified
66 .B sendmail
67 configuration file for looking up the TrustedUser option.
68 .TP
69 .B \-N
70 Include the null byte that terminates strings
71 in the map (for alias maps).
72 .TP
73 .B \-f
74 Normally all upper case letters in the key
75 are folded to lower case.
76 This flag disables that behaviour.
77 This is intended to mesh with the
78 \-f flag in the
79 .B K
80 line in sendmail.cf.
81 The value is never case folded.
82 .TP
83 .B \-q
84 Query the map for the specified key.  If found, print value to standard
85 output and exit with 0.  If not found then print an error
86 message to stdout and exit with EX_UNAVAILABLE.
87 .TP
88 .B \-u
89 Update the record for
90 .I key
91 with
92 .I value
93 or inserts a new record if one doesn't exist.  Exits with 0 on success
94 or EX_IOERR on failure.
95 .TP
96 .B \-x
97 Deletes the specific key from the map.  Exits with 0 on success or
98 EX_IOERR on failure.
99 .TP
100 .SH SEE ALSO
101 sendmail(8),
102 makemap(8)
103 .SH HISTORY
104 The
105 .B editmap
106 command has no history.