6 .\" the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific
7 .\" prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
8 .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
9 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 .\" Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers. All rights reserved.
11 .\" The following license terms and conditions apply, unless a different license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: Use, Modification and Redistribution
12 .\" (including distribution of any modified or derived work) in source and binary forms is permitted only if each of the following conditions is met: 1. Redistributions qualify as "freeware" or "Open Source Software" under one of the following terms: (a) Redistributions are made at no charge
13 .\" beyond the reasonable cost of materials and delivery. (b) Redistributions are accompanied by a copy of the Source Code or by an irrevocable offer to provide a copy of the Source Code for up to three years at the cost of materials and delivery. Such redistributions
14 .\" must allow further use, modification, and redistribution of the Source Code under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete compilable and linkable source code of sendmail including all modifications.
15 .\" 2. Redistributions of source code must retain the copyright notices as they appear in each source code file, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below. 3. Redistributions in binary form must reproduce the Copyright Notice, these license
16 .\" terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: "Copyright (c) 1998-2004 Sendmail,
17 .\" Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. The name "sendmail" is a trademark
18 .\" of Sendmail, Inc. 5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, whose copyright notice and conditions for redistribution are as follows: (a) Copyright (c) 1988, 1993 The Regents of the University of California.
19 .\" All rights reserved. (b) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (i) Redistributions of source code must retain the above copyright notice, this list of
20 .\" conditions and the following disclaimer. (ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
21 .\" (iii) Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL,
22 .\" INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS
23 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
25 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
26 .TH EDITMAP 1M "Sep 14, 2001"
27 .SH NAME
28 editmap \- query and edit single records in database maps for sendmail
29 .SH SYNOPSIS
30 .LP
31 .nf
32 \fBeditmap\fR \fB-C\fR \fIfile\fR [\fB-N\fR] [\fB-f\fR] [\fB-q\fR | \fB-u\fR | \fB-x\fR] \fImaptype\fR \fImapname\fR \fIkey\fR
33 ["\fIvalue\fR"]...
34 .fi
35
36 .SH DESCRIPTION
37 .sp
38 .LP
39 The \fBeditmap\fR command queries or edits one record in a database maps used
40 by the keyed map lookups in \fBsendmail\fR(1M). Arguments are passed on the
41 command line and output (for queries) is directed to standard output.
42 .sp
43 .LP
44 Depending on how it is compiled, \fBeditmap\fR handles up to three different
45 database formats, selected using the \fImaptype\fR parameter. See
46 \fBOPERANDS\fR.
47 .sp
48 .LP
49 If the \fBTrustedUser\fR option is set in the \fBsendmail\fR configuration
50 file and \fBeditmap\fR is invoked as root, the generated files are owned by the
51 specified \fBTrustedUser\fR.
52 .SH OPTIONS
53 .sp
54 .LP
55 The following options are supported:
56 .sp
57 .ne 2
58 .na
59 \fB\fB-C\fR \fIfile\fR\fR
60 .ad
61 .RS 11n
62 Use the specified \fBsendmail\fR configuration file (\fIfile\fR) to look up the
63 \fBTrustedUser\fR option.
64 .RE
65
66 .sp
67 .ne 2
68 .na
69 \fB\fB-f\fR\fR
70 .ad
71 .RS 11n
72 Disable the folding of all upper case letters in the key to lower case.
73 Normally, all upper case letters in the key are folded to upper case. This is
74 intended to mesh with the \fB-f\fR flag in the \fBK\fR line in
75 \fBsendmail.cf\fR. The value is never case folded.
76 .RE
77
78 .sp
79 .ne 2
80 .na
81 \fB\fB-N\fR\fR
82 .ad
83 .RS 11n
84 Include the null byte that terminates strings in the map (for alias maps).
85 .RE
86
87 .sp
88 .ne 2
89 .na
90 \fB\fB-q\fR\fR
91 .ad
92 .RS 11n
93 Query the map for the specified key. If found, print value to standard output
94 and exit with \fB0\fR. If not found then print an error message to \fBstdout\fR
95 and exit with \fBEX_UNAVAILABLE\fR.
96 .RE
97
98 .sp
99 .ne 2
100 .na
101 \fB\fB-u\fR\fR
102 .ad
103 .RS 11n
104 Update the record for key with value or inserts a new record if one doesn't
105 exist. Exits with \fB0\fR on success or \fBEX_IOERR\fR on failure.
106 .RE
107
108 .sp
109 .ne 2
110 .na
111 \fB\fB-x\fR\fR
112 .ad
113 .RS 11n
114 Delete the specific key from the map. Exit with \fB0\fR on success or
115 \fBEX_IOERR\fR on failure.
116 .RE
117
118 .SH OPERANDS
119 .sp
120 .LP
121 The following operands are supported:
122 .sp
123 .ne 2
124 .na
125 \fB\fIkey\fR\fR
126 .ad
127 .RS 12n
128 The left hand side of a record.
129 .sp
130 Each record is of the form:
131 .sp
132 .in +2
133 .nf
134 \fIkey\fR \fIvalue\fR
135 .fi
136 .in -2
137 .sp
138
139 \fIkey\fR and \fIvalue\fR are separated by white space.
140 .RE
141
142 .sp
143 .ne 2
144 .na
145 \fB\fImapname\fR \fR
146 .ad
147 .RS 12n
148 File name of the database map being created.
149 .RE
150
151 .sp
152 .ne 2
153 .na
154 \fB\fImaptype\fR \fR
155 .ad
156 .RS 12n
157 Specifies the database format. The following \fImaptype\fR parameters are
158 available:
159 .sp
160 .ne 2
161 .na
162 \fB\fBdbm\fR \fR
163 .ad
164 .RS 10n
165 Specifies \fBDBM\fR format maps.
166 .RE
167
168 .sp
169 .ne 2
170 .na
171 \fB\fBbtree\fR \fR
172 .ad
173 .RS 10n
174 Specifies B-Tree format maps.
175 .RE
176
177 .sp
178 .ne 2
179 .na
180 \fB\fBhash\fR \fR
181 .ad
182 .RS 10n
183 Specifies hash format maps.
184 .RE
185
186 .RE
187
188 .sp
189 .ne 2
190 .na
191 \fB\fIvalue\fR\fR
192 .ad
193 .RS 12n
194 The right hand side of a record.
195 .sp
196 Each record is of the form:
197 .sp
198 .in +2
199 .nf
200 \fIkey\fR \fIvalue\fR
201 .fi
202 .in -2
203 .sp
204
205 \fIkey\fR and \fIvalue\fR are separated by white space.
206 .RE
207
208 .SH SEE ALSO
209 .sp
210 .LP
211 \fBmakemap\fR(1M), \fBsendmail\fR(1M), \fBattributes\fR(5)
|
6 .\" the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific
7 .\" prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
8 .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
9 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 .\" Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers. All rights reserved.
11 .\" The following license terms and conditions apply, unless a different license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: Use, Modification and Redistribution
12 .\" (including distribution of any modified or derived work) in source and binary forms is permitted only if each of the following conditions is met: 1. Redistributions qualify as "freeware" or "Open Source Software" under one of the following terms: (a) Redistributions are made at no charge
13 .\" beyond the reasonable cost of materials and delivery. (b) Redistributions are accompanied by a copy of the Source Code or by an irrevocable offer to provide a copy of the Source Code for up to three years at the cost of materials and delivery. Such redistributions
14 .\" must allow further use, modification, and redistribution of the Source Code under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete compilable and linkable source code of sendmail including all modifications.
15 .\" 2. Redistributions of source code must retain the copyright notices as they appear in each source code file, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below. 3. Redistributions in binary form must reproduce the Copyright Notice, these license
16 .\" terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: "Copyright (c) 1998-2004 Sendmail,
17 .\" Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. The name "sendmail" is a trademark
18 .\" of Sendmail, Inc. 5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, whose copyright notice and conditions for redistribution are as follows: (a) Copyright (c) 1988, 1993 The Regents of the University of California.
19 .\" All rights reserved. (b) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (i) Redistributions of source code must retain the above copyright notice, this list of
20 .\" conditions and the following disclaimer. (ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
21 .\" (iii) Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL,
22 .\" INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS
23 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
25 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
26 .\" Copyright (c) 2019 Peter Tribble.
27 .TH EDITMAP 1M "Jan 21, 2019"
28 .SH NAME
29 editmap \- query and edit single records in database maps for sendmail
30 .SH SYNOPSIS
31 .LP
32 .nf
33 \fBeditmap\fR \fB-C\fR \fIfile\fR [\fB-N\fR] [\fB-f\fR] [\fB-q\fR | \fB-u\fR | \fB-x\fR] \fImaptype\fR \fImapname\fR \fIkey\fR
34 ["\fIvalue\fR"]...
35 .fi
36
37 .SH DESCRIPTION
38 .LP
39 The \fBeditmap\fR command queries or edits one record in a database maps used
40 by the keyed map lookups in \fBsendmail\fR(1M). Arguments are passed on the
41 command line and output (for queries) is directed to standard output.
42 .sp
43 .LP
44 Depending on how it is compiled, \fBeditmap\fR handles up to three different
45 database formats, selected using the \fImaptype\fR parameter. See
46 \fBOPERANDS\fR.
47 .sp
48 .LP
49 If the \fBTrustedUser\fR option is set in the \fBsendmail\fR configuration
50 file and \fBeditmap\fR is invoked as root, the generated files are owned by the
51 specified \fBTrustedUser\fR.
52 .SH OPTIONS
53 .LP
54 The following options are supported:
55 .sp
56 .ne 2
57 .na
58 \fB-C\fR \fIfile\fR
59 .ad
60 .RS 11n
61 Use the specified \fBsendmail\fR configuration file (\fIfile\fR) to look up the
62 \fBTrustedUser\fR option.
63 .RE
64
65 .sp
66 .ne 2
67 .na
68 \fB-f\fR
69 .ad
70 .RS 11n
71 Disable the folding of all upper case letters in the key to lower case.
72 Normally, all upper case letters in the key are folded to lower case. This is
73 intended to mesh with the \fB-f\fR flag in the \fBK\fR line in
74 \fBsendmail.cf\fR. The value is never case folded.
75 .RE
76
77 .sp
78 .ne 2
79 .na
80 \fB-N\fR
81 .ad
82 .RS 11n
83 Include the null byte that terminates strings in the map (for alias maps).
84 .RE
85
86 .sp
87 .ne 2
88 .na
89 \fB-q\fR
90 .ad
91 .RS 11n
92 Query the map for the specified key. If found, print value to standard output
93 and exit with \fB0\fR. If not found then print an error message to \fBstdout\fR
94 and exit with \fBEX_UNAVAILABLE\fR.
95 .RE
96
97 .sp
98 .ne 2
99 .na
100 \fB-u\fR
101 .ad
102 .RS 11n
103 Update the record for the specified key with the specified value or inserts a
104 new record if one doesn't exist. Exits with \fB0\fR on success or
105 \fBEX_IOERR\fR on failure.
106 .RE
107
108 .sp
109 .ne 2
110 .na
111 \fB-x\fR
112 .ad
113 .RS 11n
114 Delete the specified key from the map. Exits with \fB0\fR on success or
115 \fBEX_IOERR\fR on failure.
116 .RE
117
118 .SH OPERANDS
119 .LP
120 The following operands are supported:
121 .sp
122 .ne 2
123 .na
124 \fIkey\fR
125 .ad
126 .RS 12n
127 The left hand side of a record.
128 .sp
129 Each record is of the form:
130 .sp
131 .in +2
132 .nf
133 \fIkey\fR \fIvalue\fR
134 .fi
135 .in -2
136 .sp
137
138 \fIkey\fR and \fIvalue\fR are separated by white space.
139 .RE
140
141 .sp
142 .ne 2
143 .na
144 \fImapname\fR
145 .ad
146 .RS 12n
147 File name of the database map being created.
148 .RE
149
150 .sp
151 .ne 2
152 .na
153 \fImaptype\fR
154 .ad
155 .RS 12n
156 Specifies the database format. The following \fImaptype\fR parameters are
157 available:
158 .sp
159 .ne 2
160 .na
161 \fBdbm\fR
162 .ad
163 .RS 10n
164 Specifies \fBDBM\fR format maps.
165 .RE
166
167 .sp
168 .ne 2
169 .na
170 \fBbtree\fR
171 .ad
172 .RS 10n
173 Specifies B-Tree format maps.
174 .RE
175
176 .sp
177 .ne 2
178 .na
179 \fBhash\fR
180 .ad
181 .RS 10n
182 Specifies hash format maps.
183 .RE
184
185 .RE
186
187 .sp
188 .ne 2
189 .na
190 \fIvalue\fR
191 .ad
192 .RS 12n
193 The right hand side of a record.
194 .sp
195 Each record is of the form:
196 .sp
197 .in +2
198 .nf
199 \fIkey\fR \fIvalue\fR
200 .fi
201 .in -2
202 .sp
203
204 \fIkey\fR and \fIvalue\fR are separated by white space.
205 .RE
206
207 .SH SEE ALSO
208 .LP
209 \fBmakemap\fR(1M), \fBsendmail\fR(1M), \fBattributes\fR(5)
|