home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

$m

The DNS domain name V8.1 and above

Under V8 sendmail[19] the $m macro is used to store the domain part of the local host's fully qualified name. A fully qualified name begins with the local hostname, followed by a dot and all the components of the local DNS domain.

[19] $m is the NIS domain for pre-V8 versions of Sun sendmail, and $m is the original user address for IDA sendmail.

When V8 sendmail first starts to run, it calls gethostname(3) to get the name of the local machine. If that call fails, it sets that local name to be localhost. Then sendmail calls gethostbyname(3) or getipnodebyname(3) to find the official name for the local host. It then looks for the leftmost dot in the official name, and if it finds one, everything from the first character following that dot to the end of the name then becomes the value for $m:

host.domain
     
     domain part made the value of $m

$m is initialized before the configuration file is read. Consequently, it can be redefined in the configuration file or as a part of the command line. Because $m generally does not change once it is defined, you need not prefix it with $& when using it in rules.

    Previous Section Next Section