O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

$m

Synopsis

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.

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.

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required