components/sendmail/files/man/editmap.1m
changeset 3649 4006eaaa7d29
equal deleted inserted replaced
3648:29c40c98aad3 3649:4006eaaa7d29
       
     1 '\" te
       
     2 .\" Copyright (c) 1983 Eric P. Allman
       
     3 .\" Copyright (c) 1988, 1993 The Regents of the University of California.  All rights reserved.
       
     4 .\" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright    notice, this list of conditions and the following disclaimer. 2. 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. 3. All advertising materials mentioning features or use of this software    must display 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 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 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 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.
       
     5 .\" Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers.  All rights reserved.
       
     6 .\" 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 [email protected].  License Terms:  Use, Modification and Redistribution (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 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        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.  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 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, 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 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.  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 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.        (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, 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 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 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.
       
     7 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
       
     8 .TH editmap 1M "14 Sep 2001" "SunOS 5.12" "System Administration Commands"
       
     9 .SH NAME
       
    10 editmap \- query and edit single records in database maps for sendmail
       
    11 .SH SYNOPSIS
       
    12 .LP
       
    13 .nf
       
    14 \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 
       
    15      ["\fIvalue\fR"]...
       
    16 .fi
       
    17 
       
    18 .SH DESCRIPTION
       
    19 .sp
       
    20 .LP
       
    21 The \fBeditmap\fR command queries or edits one record in a database maps used by the keyed map lookups in \fBsendmail\fR(1M). Arguments are passed on the command line and output (for queries) is directed to standard output. 
       
    22 .sp
       
    23 .LP
       
    24 Depending on how it is compiled, \fBeditmap\fR handles up to three different database formats, selected using the \fImaptype\fR parameter. See \fBOPERANDS\fR.
       
    25 .sp
       
    26 .LP
       
    27  If the \fBTrustedUser\fR option is set in the \fBsendmail\fR configuration file and \fBeditmap\fR is invoked as root, the generated files are owned by the specified \fBTrustedUser\fR. 
       
    28 .SH OPTIONS
       
    29 .sp
       
    30 .LP
       
    31 The following options are supported:
       
    32 .sp
       
    33 .ne 2
       
    34 .mk
       
    35 .na
       
    36 \fB\fB-C\fR \fIfile\fR\fR
       
    37 .ad
       
    38 .RS 11n
       
    39 .rt  
       
    40 Use the specified \fBsendmail\fR configuration file (\fIfile\fR) to look up the \fBTrustedUser\fR option.
       
    41 .RE
       
    42 
       
    43 .sp
       
    44 .ne 2
       
    45 .mk
       
    46 .na
       
    47 \fB\fB-f\fR\fR
       
    48 .ad
       
    49 .RS 11n
       
    50 .rt  
       
    51 Disable the folding of all upper case letters in the key to lower case. Normally, all upper case letters in the key are folded to upper case. This is intended to mesh with the \fB-f\fR flag in the \fBK\fR line  in \fBsendmail.cf\fR. The value is never case folded.
       
    52 .RE
       
    53 
       
    54 .sp
       
    55 .ne 2
       
    56 .mk
       
    57 .na
       
    58 \fB\fB-N\fR\fR
       
    59 .ad
       
    60 .RS 11n
       
    61 .rt  
       
    62  Include the null byte that terminates strings in the map (for alias maps).
       
    63 .RE
       
    64 
       
    65 .sp
       
    66 .ne 2
       
    67 .mk
       
    68 .na
       
    69 \fB\fB-q\fR\fR
       
    70 .ad
       
    71 .RS 11n
       
    72 .rt  
       
    73 Query the map for the specified key. If found, print value to standard output and exit with \fB0\fR. If not found then print an error message to \fBstdout\fR and exit with \fBEX_UNAVAILABLE\fR. 
       
    74 .RE
       
    75 
       
    76 .sp
       
    77 .ne 2
       
    78 .mk
       
    79 .na
       
    80 \fB\fB-u\fR\fR
       
    81 .ad
       
    82 .RS 11n
       
    83 .rt  
       
    84 Update the record for key with value or inserts a new record if one doesn't exist. Exits with \fB0\fR on success or \fBEX_IOERR\fR on failure.
       
    85 .RE
       
    86 
       
    87 .sp
       
    88 .ne 2
       
    89 .mk
       
    90 .na
       
    91 \fB\fB-x\fR\fR
       
    92 .ad
       
    93 .RS 11n
       
    94 .rt  
       
    95  Delete the specific key from the map. Exit with \fB0\fR on success or \fBEX_IOERR\fR on failure. 
       
    96 .RE
       
    97 
       
    98 .SH OPERANDS
       
    99 .sp
       
   100 .LP
       
   101 The following operands are supported:
       
   102 .sp
       
   103 .ne 2
       
   104 .mk
       
   105 .na
       
   106 \fB\fIkey\fR\fR
       
   107 .ad
       
   108 .RS 12n
       
   109 .rt  
       
   110 The left hand side of a record.  
       
   111 .sp
       
   112 Each record is of the form:
       
   113 .sp
       
   114 .in +2
       
   115 .nf
       
   116 \fIkey\fR \fIvalue\fR
       
   117 .fi
       
   118 .in -2
       
   119 .sp
       
   120 
       
   121 \fIkey\fR and \fIvalue\fR are separated by white space.
       
   122 .RE
       
   123 
       
   124 .sp
       
   125 .ne 2
       
   126 .mk
       
   127 .na
       
   128 \fB\fImapname\fR \fR
       
   129 .ad
       
   130 .RS 12n
       
   131 .rt  
       
   132 File name of the database map being created.
       
   133 .RE
       
   134 
       
   135 .sp
       
   136 .ne 2
       
   137 .mk
       
   138 .na
       
   139 \fB\fImaptype\fR \fR
       
   140 .ad
       
   141 .RS 12n
       
   142 .rt  
       
   143 Specifies the database format. The following \fImaptype\fR parameters are available: 
       
   144 .sp
       
   145 .ne 2
       
   146 .mk
       
   147 .na
       
   148 \fB\fBdbm\fR \fR
       
   149 .ad
       
   150 .RS 10n
       
   151 .rt  
       
   152 Specifies \fBDBM\fR format maps.
       
   153 .RE
       
   154 
       
   155 .sp
       
   156 .ne 2
       
   157 .mk
       
   158 .na
       
   159 \fB\fBbtree\fR \fR
       
   160 .ad
       
   161 .RS 10n
       
   162 .rt  
       
   163 Specifies B-Tree format maps.
       
   164 .RE
       
   165 
       
   166 .sp
       
   167 .ne 2
       
   168 .mk
       
   169 .na
       
   170 \fB\fBhash\fR \fR
       
   171 .ad
       
   172 .RS 10n
       
   173 .rt  
       
   174 Specifies hash format maps.
       
   175 .RE
       
   176 
       
   177 .RE
       
   178 
       
   179 .sp
       
   180 .ne 2
       
   181 .mk
       
   182 .na
       
   183 \fB\fIvalue\fR\fR
       
   184 .ad
       
   185 .RS 12n
       
   186 .rt  
       
   187 The right hand side of a record.  
       
   188 .sp
       
   189 Each record is of the form:
       
   190 .sp
       
   191 .in +2
       
   192 .nf
       
   193 \fIkey\fR \fIvalue\fR
       
   194 .fi
       
   195 .in -2
       
   196 .sp
       
   197 
       
   198 \fIkey\fR and \fIvalue\fR are separated by white space.
       
   199 .RE
       
   200 
       
   201 .SH ATTRIBUTES
       
   202 .sp
       
   203 .LP
       
   204 See \fBattributes\fR(5) for descriptions of the following attributes:
       
   205 .sp
       
   206 
       
   207 .sp
       
   208 .TS
       
   209 tab() box;
       
   210 cw(2.75i) |cw(2.75i) 
       
   211 lw(2.75i) |lw(2.75i) 
       
   212 .
       
   213 ATTRIBUTE TYPEATTRIBUTE VALUE
       
   214 _
       
   215 Availabilityservice/network/smtp/sendmail
       
   216 .TE
       
   217 
       
   218 .SH SEE ALSO
       
   219 .sp
       
   220 .LP
       
   221 \fBmakemap\fR(1M), \fBsendmail\fR(1M), \fBattributes\fR(5)