10.3 Missing Addresses
The current, and only, rule in rule set 3 accepts anything
or nothing (the
R$* < $* > $* $2 basic RFC822 parsing
But "nothing" can be a legal address.
The expression
R$* <> $* $n handle <> error address Here, the LHS matches any address that has nothing between the angle brackets. Observe how this new LHS catches such an address:
workspace LHS $* match zero or more < < match exactly > > match exactly $* match zero or more
When such an empty address is matched by the LHS of the new rule,
the workspace is rewritten by the RHS of that rule to contain
only the single macro
define(n as MAILER-DAEMON) To observe the effect of this new rule in action, add it to the client.cf file. This new rule should precede the existing rule in rule set 3:
S3 # preprocessing for all rule sets Now run sendmail in rule-testing mode once again:
%
Here, two rule sets (3 and 0) are specified instead of one as you have been
doing all along.
Rule set 3 is called first, and it throws away everything but the address between
the angle brackets. The rewritten workspace is then given to rule set
0, which selects the But now give sendmail an empty address, with nothing in the angle brackets:
>
As you may expect, the empty address is
caught by the new rule in rule set 3 and converted
(in the workspace) to the value of |
|