The K Configuration Command

The K configuration command is used to associate a symbolic name with a database-map type. The symbolic name will later be used in the RHS of rules. The form of the K command looks like this:

Kname type args

The name is the symbolic name, the type is the kind of database map to use, and the args specifies its location and properties. We describe each in turn.

The name

The name portion of the K configuration command immediately follows the K. Whitespace between the K and the name is optional:

K name type args
 optional whitespace

The name must begin with a letter or digit and can contain only letters, digits, and the underscore character:

K local_hosts   good
K $andcents bad

The case of the letters in name does not matter. All names are converted to lowercase before they are stored:

K local_hosts   the same

If you begin a name with a bad character, the following error will be printed and that K line will be ignored:

configfile: line num: readcf: config K line: no map name

If a bad character appears in the middle of a name, the part preceding the bad character will be taken as the name, and the part following the bad character will be taken as the type. For example, the name me@home will produce this error:

configfile: line num: readcf: map me: class home  not available

The type

Recall that the type[2] portion of the K configuration command follows the name:

Kname type args

Note that whitespace between the name and the type can be a joined indented ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.