Macros and the System Identity

The nature of email addresses requires that sendmail have a firm understanding of the machine on which it is running. The -d0.4 debugging switch (-d0.4 on page 542) causes sendmail to print its understanding of what the local machine is. A portion of that output displays the value of four key sendmail macros:

=  ==  ==  ==  ==  ==  = SYSTEM IDENTITY (after readcf) =  ==  ==  ==  ==  ==  =
      (short domain name) $w = here
  (canonical domain name) $j = here.our.domain
         (subdomain name) $m = our.domain
              (node name) $k = here
=  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==
==  ==  ==  ==  ==  ==  =

The short domain name (in $w; see $w on page 850) is simply the name of the local host without any domain information added as a suffix. The canonical domain name (in $j; see $j on page 830) is the fully qualified and official name of the local machine. The subdomain name (in $m; see $m on page 833) is just the domain part of the canonical name without a leading dot. And the node name (in $k; see $k on page 831) is the UUCP name of the local machine.

In addition to these macros, sendmail initializes the class $=w with a list of alternative names for the local host ($=w on page 876), and the class $=m with a list of the local domains ($=m on page 872).

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.