Name
$=w
Synopsis
Before the sendmail
program reads its configuration file, it calls
gethostbyname(3) or
getipnodebyname(3) to find all the known aliases
for the local machine. The argument given to
gethostbyname(3) or
getipnodebyname(3) is the value of the
$w
macro that was derived from a call to
gethostname(3) ($w).
Depending on the version of sendmail you are
running, the aliases that are found will be either those from your
/etc/hosts file or those found as additional
A
or AAAA
records in a DNS
lookup. Then, depending on the DontProbeInterfaces
option (DontProbeInterfaces), sendmail
will round out that picture by examining (probing) each network
interface and extracting from it the associated IP address or
hostname.
To see the aliases that sendmail found, or to
see what it missed and should have found, use the
-d0.4
debugging switch (-d0.4). Any aliases that are found are printed as:
aka: alias
Depending on your version of sendmail, each alias is either a hostname (such as rog.stan.edu) or an IPv4 address (such as [123.45.67.8]), or an IPv6 address (such as [IPv6:2002:c0a8:51d2::23f4]).
Many sendmail.cf files use the
$=
w
class macro to
define all the ways users might reference the local machine. This
list must contain all names for the local
machine as given in the /etc/hosts file, all
names for the local host as listed in DNS (including CNAME and MX
records), and the names associated with your network interfaces. For
example:
# All our routing identities Cw server1 server2 # All ...
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.