[net.unix] Sendmail Answers

pedz@smu.UUCP (08/13/84)

#N:smu:18500019:000:1801
smu!pedz    Aug 13 15:27:00 1984

A few weeks ago I sent out a list of questions about the sendmail
config file.  I received some helpful replies along with other requests
to post my results.  I would like to thank Guy Harris and Keith Pilotti
for responding to my question.

First, the easy stuff.  The list of Berkeley sites which is in many
sendmail config files can be removed if care is taken to also remove
any references to the class they define.

It was generally suggested that the set of rewriting rules
that are listed in S3 rule set be kept.  Some of them such as
host:user -> user@host and host.user -> user@host are used by
Berknet.  Basically the philosophy is that they do not do any
harm and you never can tell when they may be needed.

Now on to the more interesting and complex issues about the
semantics of $@ and $:.  The $@ is fairly easy to understand.
It says to return from the ruleset and return the RHS of the rule.
This terminates any future processing of rules further down in the
ruleset.

To understand the $: actions you need to understand the general
processing of a ruleset.  Rules in a ruleset are applied in
order.  When the LHS of a rule matches, the RHS is substituted
for the address.  Then this rule is applied again.  (Not the entire
ruleset however).  Thus the same rule is applied repeatedly until
the LHS fails to match.  After the LHS fails to match, the next
rule of the ruleset if tried.

The $: operator causes the rule NOT to be reapplied.  Thus if
the $: prefixes the RHS, and the LHS matches, then the remainder
of the RHS (after the $:) is substituted for the address and the
processing continues to the next rule immediately without repeating
the current rule.  Thus it prevents an infinite loop when the result
from the RHS will always match the LHS.

Perry Smith
convex!smu!pedz