.\" Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers. .\" All rights reserved. .\" .\" By using this file, you agree to the terms and conditions set .\" forth in the LICENSE file which can be found at the top level of .\" the sendmail distribution. .\" .\" .\" $Sendmail: editmap.8,v 1.9 2003/02/01 17:07:42 ca Exp $ .\" .Dd March 15, 2003 .Dt EDITMAP 8 .Os .Sh NAME .Nm editmap .Nd query and edit records in database maps for sendmail .Sh SYNOPSIS .Nm editmap .Bk -words .Op Fl C Ar file .Op Fl N .Op Fl f .Op Fl q | Fl u | Fl x maptype mapname key .Op Dq value ... .Ek .Sh DESCRIPTION .Nm editmap queries or edits one record in database maps used by the keyed map lookups in .Xr sendmail 8 . Arguments are passed on the command line and output (for queries) is directed to standard output. .Pp Depending on how it is compiled, .Nm handles up to three different database formats, selected using the .Ar maptype parameter. They may be .Bl -tag -width Fl .It Li dbm DBM format maps. This requires the .Xr ndbm 3 library. .It Li btree B-Tree format maps. This requires the new Berkeley DB library. .It Li hash Hash format maps. This also requires the Berkeley DB library. .El .Pp If the .Li TrustedUser option is set in the sendmail configuration file and .Nm is invoked as root, the generated files will be owned by the specified .Li TrustedUser . .Ss Flags .Bl -tag -width Fl .It Fl C Ar file Use the specified .Xr sendmail 8 configuration .Ar file for looking up the .Li TrustedUser option. .It Fl N Include the null byte that terminates strings in the map (for alias maps). .It Fl f Normally all upper case letters in the key are folded to lower case. This flag disables that behaviour. This is intended to mesh with the .Fl f flag in the .Dq K line in sendmail.cf. The value is never case folded. .It Fl q Query the map for the specified key. If found, print value to standard output and exit with 0. If not found then print an error message to stdout and exit with .Dv EX_UNAVAILABLE . .It Fl u Updates the record for .Ar key with .Ar value or inserts a new record if one doesn't exist. Exits with 0 on success or .Dv EX_IOERR on failure. .It Fl x Deletes the specific key from the map. Exits with 0 on success or .Dv EX_IOERR on failure. .El .Sh SEE ALSO .Xr makemap 8 , .Xr sendmail 8 .Sh HISTORY The .Nm command appeared in .Ox 3.0 .