Name

$[ $]

Synopsis

The $[ $] operators are used to convert a non-fully qualified hostname, or a CNAME, into the official, fully qualified hostname. They are also used to convert square bracket-enclosed addresses into hostnames. They must be used in a pair with the host or address to be looked up between them. To illustrate, consider this rule:

R $+ < @ $+ >           $: $1 < @ $[ $2 $] >

This rule will match a focused address such as gw<@wash> and cause the host part (the second $+ on the LHS) to be passed to the RHS (the $2). Because the $2 is between the pair of $[ $] operators, it is looked up with DNS and converted to a fully qualified hostname. Thus, the domain dc.gov, for example, will have the host wash fully qualified to become wash.dc.gov. These $[ $] operators can be used only on the RHS, and are fully described in Section 23.4.3.

Get Sendmail, 3rd 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.