The F Class Command
The F
form of the
class configuration command allows values to be
appended to a class from outside the configuration
file. In general, the file command looks like one of
the following:
FX file ← values from a disk file FX |program ← values via another program (V8.7 and later) FX key@dbmap ← values from a database map (V8.12 and later)
The F
is
immediately followed by the name of the class. This
can be either a single-character name, as shown, or
a multicharacter name. The name is followed by
optional whitespace and then a filename, a program
name, or a database-map lookup. If the name begins
with the pipe character (|
), it is taken to be the name of a
program to run.[332] If the name includes an @
character, it is taken
to be a key to look up, and the name of a database
map. Otherwise, it is taken to be the name of a file
to read.
If SCANF (SCANF on page 137) was
defined when sendmail was
compiled, each line that is read from a file or
program (but not from a database map) is parsed by
the C-language scanf(3) library
routine. The formatting pattern given to
scanf(3) is %s
, which tells
scanf(3) to read only the
first whitespace-delimited word from each line of
text.
When the configuration file is processed, the file is opened for reading, or the program is executed, or the database map is opened for lookups. If any cannot be opened (for reading, execution, or lookups), the following error is logged and sendmail ignores that configuration command:
fileclass: cannot ...
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.