-k

Specify column for key or key name V8.7 and later

Beginning with V8.7, sendmail began to support a flat text-file form of database. The /etc/hosts file is an example of such a flat file, in that it is organized in a line-by-line manner:

123.45.67.89      here.our.domain

When such files are read as databases (with the text type, text on page 941) you need to specify which column contains the key and which contains the value.

For nisplus, netinfo, and ph database maps, the -k switch specifies the name (text) of the desired column.

When the -k switch specifies which column contains the key, its absence defaults to 0 for the text type (which is indexed beginning with 0) and defaults to the name of the first column for the nisplus type. See also -v (-v on page 891) for the returned value’s column, and -z (-z on page 891) for the column delimiter.

Finally, note that for ldap database maps, the -k switch has a different meaning, one that is particular to that type.

Get sendmail, 4th 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.