1 EDITMAP(1M) Maintenance Commands EDITMAP(1M) 2 3 4 5 NAME 6 editmap - query and edit single records in database maps for sendmail 7 8 SYNOPSIS 9 editmap -C file [-N] [-f] [-q | -u | -x] maptype mapname key 10 ["value"]... 11 12 13 DESCRIPTION 14 The editmap command queries or edits one record in a database maps used 15 by the keyed map lookups in sendmail(1M). Arguments are passed on the 16 command line and output (for queries) is directed to standard output. 17 18 19 Depending on how it is compiled, editmap handles up to three different 20 database formats, selected using the maptype parameter. See OPERANDS. 21 22 23 If the TrustedUser option is set in the sendmail configuration file and 24 editmap is invoked as root, the generated files are owned by the 25 specified TrustedUser. 26 27 OPTIONS 28 The following options are supported: 29 30 -C file 31 Use the specified sendmail configuration file (file) to look 32 up the TrustedUser option. 33 34 35 -f 36 Disable the folding of all upper case letters in the key to 37 lower case. Normally, all upper case letters in the key are 38 folded to lower case. This is intended to mesh with the -f 39 flag in the K line in sendmail.cf. The value is never case 40 folded. 41 42 43 -N 44 Include the null byte that terminates strings in the map 45 (for alias maps). 46 47 48 -q 49 Query the map for the specified key. If found, print value 50 to standard output and exit with 0. If not found then print 51 an error message to stdout and exit with EX_UNAVAILABLE. 52 53 54 -u 55 Update the record for the specified key with the specified 56 value or inserts a new record if one doesn't exist. Exits 57 with 0 on success or EX_IOERR on failure. 58 59 60 -x 61 Delete the specified key from the map. Exits with 0 on 62 success or EX_IOERR on failure. 63 64 65 OPERANDS 66 The following operands are supported: 67 68 key 69 The left hand side of a record. 70 71 Each record is of the form: 72 73 key value 74 75 76 key and value are separated by white space. 77 78 79 mapname 80 File name of the database map being created. 81 82 83 maptype 84 Specifies the database format. The following maptype 85 parameters are available: 86 87 dbm 88 Specifies DBM format maps. 89 90 91 btree 92 Specifies B-Tree format maps. 93 94 95 hash 96 Specifies hash format maps. 97 98 99 100 value 101 The right hand side of a record. 102 103 Each record is of the form: 104 105 key value 106 107 108 key and value are separated by white space. 109 110 111 SEE ALSO 112 makemap(1M), sendmail(1M), attributes(5) 113 114 115 116 January 21, 2019 EDITMAP(1M)