DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Sendmail Installation and Operation Guide
SMM:08-41
local-part@host-domain-spec
Ruleset three is applied by sendmail before doing anything with any address.
If no "@" sign is specified, then the host-domain-spec may be appended (box "D" in Fig-
ure 1) from the sender address (if the C flag is set in the mailer definition corresponding to the
sending mailer).
Ruleset zero is applied after ruleset three to addresses that are going to actually specify
recipients. It must resolve to a {mailer, host, address} triple. The mailer must be defined in the
mailer definitions from the configuration file. The host is defined into the $h macro for use in
the argv expansion of the specified mailer. Notice: since the envelope sender address will be
used if a delivery status notification must be send, i.e., is may specify a recipient, it is also run
through ruleset zero. If ruleset zero returns a temporary error 4xy then delivery is deferred.
This can be used to temporarily disable delivery, e.g., based on the time of the day or other vary-
ing parameters. It should not be used to quarantine e-mails.
Rulesets one and two are applied to all sender and recipient addresses respectively. They
are applied before any specification in the mailer definition. They must never resolve.
Ruleset four is applied to all addresses in the message. It is typically used to translate
internal to external form.
In addition, ruleset 5 is applied to all local addresses (specifically, those that resolve to a
mailer with the `F=5' flag set) that do not have aliases. This allows a last minute hook for local
names.
5.1.4. Ruleset hooks
A few extra rulesets are defined as "hooks" that can be defined to get special features.
They are all named rulesets. The "check_*" forms all give accept/reject status; falling off the
end or returning normally is an accept, and resolving to $#error is a reject or quarantine. Quar-
antining is chosen by specifying quarantine in the second part of the mailer triplet:
$#error $@ quarantine $: Reason for quarantine
Many of these can also resolve to the special mailer name $#discard; this accepts the message
as though it were successful but then discards it without delivery. Note, this mailer cannot be
chosen as a mailer in ruleset 0. Note also that all "check_*" rulesets have to deal with tempo-
rary failures, especially for map lookups, themselves, i.e., they should return a temporary error
code or at least they should make a proper decision in those cases.
5.1.4.1. check_relay
The check_relay ruleset is called after a connection is accepted by the daemon. It is
not called when sendmail is started using the -bs option. It is passed
client.host.name $| client.host.address
where $| is a metacharacter separating the two parts. This ruleset can reject connections
from various locations. Note that it only checks the connecting SMTP client IP address and
hostname. It does not check for third party message relaying. The check_rcpt ruleset dis-
cussed below usually does third party message relay checking.
5.1.4.2. check_mail
The check_mail ruleset is passed the user name parameter of the
SMTP MAIL
com-
mand. It can accept or reject the address.