Name
-k
Synopsis
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), 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) for the returned
value’s column, and -z
(-z) 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, 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.