Configuring a Domain to Accept Mail

Internet e-mail addresses can take one of two forms:

[email protected], where username is the recipient's username and hostname is a computer's hostname. (The address can also use an IP address, typically surrounded by square brackets, in place of a hostname.) For instance, mail might be addressed to [email protected] . This form of addressing is likely to work so long as the target computer is configured to accept mail addressed to it.

[email protected], where username is the recipient's username and domain.name is the domain name. For instance, mail might be addressed to [email protected]. Such addressing is usually shorter than an address that includes the mail server computer's full hostname, and it can be more reliable, depending on the domain's configuration.

In order for the second sort of address to work, the domain requires a special Domain Name System (DNS) entry. This entry is known as a mail exchanger (MX) record, and it points sending mail servers to a specific mail server computer. For instance, the MX record for pangaea.edu might point tosmtp.pangaea.edu. Therefore, mail addressed to [email protected] is delivered to the smtp.pangaea.edu server, which may process it locally or forward it to another computer.

Chapter 27, "Miscellaneous Servers," describes configuring the Berkeley Internet Name Domain (BIND) DNS server. In brief, an MX record belongs in the domain's control file, which is usually in /var/named and is usually named after the domain, such as named.pangaea.edu forpangaea.edu. (The exact name is arbitrary, though.) An MX record for pangaea.edu, pointing external SMTP servers to smtp.pangaea.edu for mail delivery, would look like this:

@ IN MX 5 smtp.pangaea.edu.

The leading at sign (@) is a stand-in for the domain name. The IN is a standard part of most host definitions. MX, of course, refers to the fact that this is an MX entry. The number 5 in this example refers to the priority of the server. One of the advantages of using a domain name for mail delivery is that you can specify several mail servers, using one as a primary mail server and one or more as backups in case the primary server goes down. Outside SMTP servers try the MX entry with the lowest priority code first. The final field in this entry is the hostname of the mail server itself. Note that this entry ends with a dot (.). If the name doesn't end with a dot, the system attempts to add the domain name to the name specified; therefore, if you include the domain name but no dot, the domain portion will be doubled, and chances are the mail won't be delivered.

If another system administrator runs your domain's DNS server, consult that individual about MX record administration. If you use an outside provider, such as a domain registrar's DNS server, you may need to enter the MX record information in a web-based form. These forms may attempt to mirror the layout of information you'd find in a DNS server's configuration, as just described, but they may not allow you to change fixed information. Alternatively, the form may present simplified data entry fields, such as fields for the server priority code and hostname alone.

It's possible for a computer on one domain to function as a mail server for an entirely different domain. For instance, mail.threeroomco.com could be the mail server for pangaea.edu. This configuration requires setting up the server to accept mail addressed to the domain in question, and of course entering the full path to the mail server in the target domain's MX record.

Team LIB

1 previous

Team LIB

^ previous

0 0

Post a comment