''check_etrn'' '''


Allow or disallow ETRN Policy rule set

The SMTP ETRN command (Section causes V8.8 and above sendmail to asynchronously process its queue in a manner similar to the -qR command-line switch (Section This command allows dial-on-demand sites to make an SMTP connection and to force the other side to process and send any mail that is queued for them.

The form of this ESMTP command looks like this:

ETRN host
ETRN #queuegroup       V8.12 and above 

If host or queue group is missing, this error message will be returned:

550 5.7.1 Parameter required

Otherwise, the queue will be processed just as if the following command-line argument were given:

-qGqueuegroup               V8.12 and above 

If the PrivacyOptions option's noetrn is set, or if the DaemonPortOptions option's Modify=E (See this section) is set, the SMTP ETRN command will be disallowed with the following message:

502 5.7.0 Sorry, we do not allow this operation

One use for the check_etrn rule set is to allow the SMTP ETRN command for specific hosts but not others.[8] When the ETRN command is given, it can provide the domain for which to run the queue. That domain specification is given to the check_etrn rule set in its workspace. To illustrate, consider the following lines in your mc configuration file:

[8] See ${load_avg} for an example of how to use check_etrn to allow SMTP ETRN only when the load average is low enough.

F{EtrnHosts} /etc/mail/etrn_hosts

R $={EtrnHosts}       $# OK
R $*                  $# error $@ 5.7.0 $: "502 We don't ETRN for you."

There are two parts here. The first part, the LOCAL_CONFIG part, uses the F configuration command (Section 22.1.2) to load the $={EtrnHosts} class with a list of hosts for which we will perform SMTP ETRN. That list is read from the file /etc/mail/etrn_hosts, which lists the hosts, one per line.

The second part, the LOCAL_RULESETS part, sets up the check_etrn rule set. There are two rules in this rule set. The first rule matches any hosts that are in the {EtrnHosts} class, and accepts them with a $# OK. The second rule disallows ETRN for all other hosts.

For a scheme such as this to work, you should make certain that all possible names for the allowed hosts are included in the list. That is, for example, mx.wash.dc.gov might also require you to list wash.dc.gov.

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command