'-q'' ''''

-q

Query for specified key editmap command-line switch

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.



    Part I: Build and Install
    Chapter 2. Build and Install sendmail
    Chapter 4. Configure sendmail.cf with m4
    Part II: Administration
    Part III: The Configuration File