$=w
List of our other names All versions
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 on page 850).
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 on page 1023),
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 on page 542). 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]).
Prior to V8.13, sendmail would also add leading name
components to the list of host names in $=w
(for example, for
the hostname a.b.c.d, it would
add a and
a.b). Also prior to V8.13, each such name found (if not duplicated) would be reverse-looked-up to find its IP number and that IP number would be added to the list. Beginning with V8.13, ...
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.