Name
-q
Synopsis
The editmap program must be run with one of
three mandatory command-line switches. This -q
switch is one of those three.
The -q
command-line switch tells
editmap to open the database file in read-only
mode, and look up and print the value of the key:
%editmap -q
dbtype dbfile sought-key
If the dbfile
lacks read 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, its value is
printed and editmap exits with a zero exit
value. 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.