21. DNS and sendmail
Contents:
21.1 OverviewDNS stands for Domain Naming System. A domain is any logical or physical collection of related hosts or sites. A naming system is best visualized as an inverted tree of information that corresponds to full qualified hostnames (see Figure 21.1 ). Figure 21.1: Domain names form a tree of informationThe parts of a fully qualified name are separated from one another with dots. For example,
here.uofa.edu
This name describes the machine
here.uofa.edu. implied
The root corresponds to (is served by) actual machines.
[2]
Each has knowledge of all the top-level domains
(such as
A knowledgeable machine, one that can look up or distribute information about its domain and subdomains, is called a name server . Each little black square in the figure represents a name server for a portion of a domain. Each is required to have knowledge only of what is immediately below it. This minimizes the amount of knowledge any given name server must store and administer. To illustrate the way this distributed information is used, see Figure 21.2 for the steps that are taken when sendmail on here.uofa.edu (the local host) attempts to connect to fbi.dc.gov (the remote host) to send an email message to a user there. Figure 21.2: How DNS lookups are performed
Note that this is a simplified description. The actual practice can be more or less complex depending on who is "authoritative" about which machines and domains and what is cached where. The sendmail program needs the IP address of the machine to which it must connect. That address can be returned by name servers in three possible forms:
21.1.1 Which DNS? 4.8.3 or 4.9?Before we discuss DNS in greater detail, we must first attend to an administrative detail. Every site on the Internet should run BIND software version 4.8.3 at the minimum. BIND provides the software and libraries that are needed to perform DNS inquiries. Version 4.8.3 was the last stable version before Paul Vixie (while at dec.com ) started rewriting the code. The current release is 4.9. [5]
Unless you are already running the latest version, you should consider upgrading to V4.9. BIND 4.9 is available via anonymous FTP from
We won't describe in this book how to install BIND. Instead, you should refer to the book DNS and BIND by Paul Albitz and Cricket Liu (O'Reilly & Associates, 2nd edition, 1997). 21.1.2 Make sendmail DNS AwareNot all releases of sendmail are ready to use DNS. To determine whether yours is ready, type the following command:
% Look for a statement that indicates whether or not your sendmail was compiled with NAMED_BIND support (see Section 18.8.23, NAMED-BIND ). If so, it can use DNS. If not, either you will have to get a corrected version from your vendor [6] or you will have to download and compile the latest version of sendmail from scratch (see Section 18.3, "Obtain the Source" ).
But even if your
sendmail
binary supports DNS, site configuration
may not.
If your host supports a service-switch file, for instance,
make sure it lists
Another possible problem might be your configuration
file. It may, for example, have been derived from the
%
If it was, as indicated by the phrase If your sendmail still seems unable to use DNS, despite your efforts, look for other reasons for failure. Make sure, for example, that your /etc/resolv.conf file is present and that it contains the address (not the name) of a valid name server machine for your domain. If you are running NIS or NIS+, make sure it is configured to look up hosts with DNS. |
|