Local_check_mail and check_mail
The Local_check_mail rule set provides a
hook into the check_mail rule set, which is used to
validate the envelope-sender address given in the
MAIL From:
command of the SMTP dialog:
MAIL From:<sender@host.domain>
The check_mail rule
set is called immediately after the MAIL From: command is
read. The workspace passed to check_mail is the
address following the colon in the MAIL From: command. That
envelope-sender address might or might not be
surrounded by angle braces.
If sendmail’s delivery mode is
anything other than deferred (-bd on
page 234), the check_mail rule set performs the
following default actions:
Calls the
tls_clientrule set (The access database with tls_server and tls_client on page 214) to perform TLS verification, if neededAccepts all envelope-sender addresses of the form
< >Makes certain that the host and domain part of the envelope-sender address exists
If the access database (The access Database on page 277) is used, looks up the envelope-sender in that database and rejects, accepts, or defers the message based on the returned lookup value
The Local_check_mail rule set provides a
hook into check_mail before the preceding checks
are made, and provides a place for you to insert
your own rules.
To illustrate one use for the Local_check_mail rule set, consider the
need to accept all mail from an internal domain,
even when many of the hosts in that domain cannot be
looked up with DNS.[120] One method might look like this:
LOCAL_RULESETS SLocal_check_mail ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access