Name
DontExpandCnames
Synopsis
Ordinarily, the $[
and $]
operators (Section 18.7.6) cause the enclosed hostname
to be looked up with DNS[26] and
replaced with the canonical address for that host. The canonical
address is the A or AAAA DNS record. For example, consider these DNS
records:
here.us.edu. IN A 123.45.67.89 ftp.us.edu. IN CNAME here.us.edu.
But if the address ftp.us.edu is fed to the
$[
and $]
operators in the RHS
of a rule:
R $* $[ $1 $]
the rewritten result of passing ftp.us.edu as
$1
will be the name
here.us.edu. This behavior was correct under
RFC822 and RFC1123, and with the publication of RFC2821 and RFC2822
this change is now officially correct.
Sometimes it is important for the CNAME to appear in email headers as the canonical name. One example might be that of an FTP service moving from one machine to another during a transition phase. In that instance, outgoing mail should appear to be from ftp.us.edu because the records will change after the move, and the ability to reply to such mail must be maintained:
here.us.edu. IN A 123.45.67.89 ← retired and gone ftp.us.edu. IN CNAMEthere.us.edu.
there.us.edu.
IN A 123.45.67.90
Another possibility might be that of a mobile host (a workstation that plugs into different networks and thus has different A records over time):
mobile.us.edu. IN CNAME monday.dc.gov. monday.dc.gov. IN A 12.34.56.78 tuesday.foo.com. IN A 23.45.67.89
Whenever this workstation is plugged in, its CNAME record is changed to point to the A record of the ...
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.