Name

-x

Synopsis

The editmap program must be run with one of three mandatory command-line switches. This -x switch is one of those three.

The -x command-line switch tells editmap to open the database file in read/write mode, to look up the key, and, if found, to delete the key and its value from the database:

% editmap -x dbtype dbfile sought-key 

If the dbfile lacks read/write permission, the following error will print and editmap will exit with an EX_IOERR (EX_IOERR) exit value.

editmap: error opening type dbtype map dbfile: Permission denied

If the sought-key is found, it and its value are silently deleted from the database. If the sought-key is not found, editmap prints the following error and exits with an EX_UNAVAILABLE (EX_UNAVAILABLE) exit value:

editmap: couldn't find key sought-key in map dbfile

If you get this error when reading aliases-style database files, consider adding the -N command-line switch.

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.