Rules Check Header Contents
Recall that a header line declaration looks like the following:
H?flags?name:field
Here, the H
begins the line and tells
sendmail that a header definition follows. The
?
flags
?
expression causes sendmail to include the header
only if one of the flags
is found in the
selected delivery agent’s F=
equate. As you saw in the previous section, beginning with V8.10, a
macro name can replace the flags
. The
name
and a colon then follow.
Beginning with V8.10, sendmail allows the name
of a rule set to replace the field
value.
That rule set declaration can come in two forms:
Hname: $> rule set Hname: $>+ rule set← don't strip comments
Both forms basically say the same thing: if
sendmail finds a header
name already in a message it is processing, it
passes the existing header field
to the
rule set indicated. The +
in the second form tells
sendmail to leave intact (not strip)
parenthesized RFC2822 comments from the passed
field
:
text (comments)
The $>
in the earlier declaration passes just
text
to the rule set, while
$>
+ passes the unstripped text with RFC2822
comments intact.
If the rule set specified is not a legal rule set name, or if it is missing, the following error will be printed and logged:
cf file name: line number: invalid rule set name: "bad name"
If the named rule set does not exist in the configuration file, the effect is the same as if it did exist and had returned a legal value.
Rule sets called to process headers can return two possible rejection values, ...
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.