check_etrn

Allow or disallow ETRN Policy rule set

The SMTP ETRN command (Process the queue via ESMTP ETRN on page 433) causes V8.8 and above sendmail to asynchronously process its queue in a manner similar to the -qR command-line switch (Process by identifier/recipient/sender: -q[ISR] on page 431). 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 #queuegroupV8.12 and above

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

550 5.7.1 Parameter required

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

-qR@host
-qGqueuegroupV8.12 and above

If the PrivacyOptions option’s noetrn is set, or if the DaemonPortOptions option’s Modify=E (DaemonPortOptions=Modify= on page 996) 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.[267] 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:

LOCAL_CONFIG F{EtrnHosts} /etc/mail/etrn_hosts LOCAL_RULESETS Scheck_etrn R $={EtrnHosts} $# OK R $* $# error $@ 5.7.0 $: ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.