The X Configuration Command
When the MILTER Build-time macro is enabled, sendmail offers a way to submit messages to external programs that can be used to screen messages for spam indicators, viruses, or other content that you might want to reject, defer, or quarantine. At the end of this chapter, we will show you the library routines to use for making these decisions. Here, we discuss the hooks inside the configuration file that allow sendmail to exchange information with external programs.
External programs are defined for use with the
X
configuration
file command. The form for that command looks like
this:
Xname, equates ... ← cf file INPUT_MAIL_FILTER(`name', `equates ...') ← mc file MAIL_FILTER(`name', `equates ...') ← mc file
The X
in the first
line, like all configuration commands, must begin a
line. It is immediately followed by the name you
will assign to the external Milter program, with no
intervening spaces. That
name
is for
sendmail’s use only, and does
not need to be the actual name of the program. The
name is followed by a comma. If you accidentally
prefix the name with a space (in the
cf or mc
form), or omit the name, the following error will
print and the sendmail program
will exit:
cf file: line number name required for mail filter
The equates is a sequence of comma-separated expressions that are formed by a key letter, an equals sign, and a value:
key-letter=value
The recognized key letters and their meanings are shown in Table 26-3.
Table 26-3. X configuration command ...
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.