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


Previous Section Next Section

-d0.4

Our name and aliases Debug command-line switch

The -d0.4 debugging switch tells sendmail to print several lines of information in addition to those printed by -d0.1:

Version 8.12.7
Compiled with:   LOG MATCHGECOS NAMED_BIND NDBM NEWDB NETINET NETUNIX
                 NIS
canonical name: here.US.EDU                               additional 
 UUCP nodename: here                                      additional 
        a.k.a.: [123.45.67.89]                            additional 
=  ==  ==  ==  ==  ==  = SYSTEM IDENTITY (after readcf) =  ==  ==  ==  =
            (short domain name) $w = here
        (canonical domain name) $j = here.US.EDU
               (subdomain name) $m = US.EDU
                    (node name) $k = here
=  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  =

To find the canonical name of the local host, sendmail calls gethostname( ). If that call fails, the name localhost is used. The hostname is then looked up with the internal routine sm_gethostbyname( ), which gathers additional information (such as other names and addresses for the machine) and fixes several bugs in some operating system's versions of the gethostby... routines. Next the canonical name for the local host is looked up. For operating systems that normally support switched services, the name is looked up as specified. For systems that specify switched services in the configuration file's ServiceSwitchFile option (ServiceSwitchFile), switched services are not used because the configuration file has not been read yet. (This canonicalization process can be traced with the -61.10 debugging switch.) If the canonical name is found and that name contains a dot, sendmail saves the part of the name to the right of the leftmost dot as the domain name in the $m sendmail macro ($m). It also appends the part of the name to the left of the leftmost dot to the class w ($=w). If the canonical name doesn't contain a dot, the $m macro is undefined, and the whole name is appended to the class w.

In addition, sendmail also sets the $k sendmail macro ($k) to be the correct UUCP name for the machine. It uses uname(3), if available, to find that name. Otherwise, it uses the same strategy as for class w.

Then sendmail lists any other name, or address (in square brackets), that it found. If it finds any, it prints the found item prefixed by an a.k.a.: and adds each found item to the class w. The aliases listed are only those found using gethostbyname(3). To see each entry as it is added to the class w, use the -d37.8 debugging switch.

Finally, sendmail scans the network hardware to find any other names associated with interfaces. If the ioctl(2) call to get that information fails, the -d0.4 debugging switch causes sendmail to print that failure:

SIOGIFCONF failed: reason here

If any are found, each is printed with an a.k.a.: prefix and added to the class $=w.

    Previous Section Next Section