Understanding E-mail and the DNS
The Domain Name System (DNS) plays a huge role in the successful installation of any Internet-based mail server. To emphasize this point we decided to address DNS records right up front. If you are already familiar with the workings of the DNS feel free to skip to the next chapter for a discussion of additional items to be considered before installing your Post.Office mail server. If the DNS is new to you, or youd like a refresher on the topic, youve come to the right place.
The Domain Name System (DNS) is a distributed system for sharing information about computers (and other things). It is organized in a hierarchical structure with root domains (like Acme.com) at the top of the hierarchy and subdomains nested within those root domains.
The DNS is a fundamental part of the Internet and, therefore, Internet mail. It is managed by DNS servers which store records containing domain information (i.e. Fully Qualified Domain Names and the related TCP/IP addresses).
A Fully Qualified Domain Name (FQDN) is the unique name that identifies a specific Internet location. FQDNs consist of two or more sections, separated by dots. Each section is a string of letters or numbers without spaces, usually a recognizable word or abbreviation. The order of the sections in an FQDN is significant. As you move from left to right each section represents a more general level in the Domain Name System (DNS) hierarchy.
For example, lets assume youre installing Post.Office on a computer named yourPC and you work for the Acme company. The FQDN for your site would be structured as follows:
yourPC.Acme.com
With reference to Post.Office, the FQDN is further defined as consisting of two parts: the host and the domain. The host is the first (leftmost) section of the FQDN and typically corresponds to the name of the computer. The domain is the remainder of the FQDN and often tells you something about where the computer is located (e.g., at Acmes corporate headquarters).
In the example above yourPC is the host, and Acme.com is the domain.
Alternatively, if your FQDN had been yourPC.MainOffice.Acme.com, then your host would still be yourPC, but your domain would be MainOffice.Acme.com.
If you are currently on the Internet, a Fully Qualified Domain Name (FQDN) has already been established for your machine. Check the TCP/IP configuration files on your machine to identify your FQDN and its component parts (the host and Internet domain names) then note them for future reference.
If you are not yet hooked up to the Internet, you may not yet have a domain established. You will need to get a registered Internet domain as part of your Internet package when you get Internet access.
If you will be handling local mail only (i.e., you are not hooked up to the Internet and have no plans be) you will still need to designate a domain name, but it can be any name of your choosing and you do not need to register it.
All "root" domains, that is domains such as Acme.com, are obtained from InterNIC. InterNIC is the organization in charge of giving out and keeping track of all root domains on the Internet. To establish your root domain contact InterNIC directly at: http://InterNIC.net/
You can also get a domain from your Internet Service Provider (ISP). If you follow this course, your ISP may maintain your "MX" records for you, making your E-mail system configuration that much easier.
A DNS server (sometimes called a nameserver) is a program that answers questions about the DNS. Like all else on the Internet, DNS servers are set up in a distributed hierarchical fashion, so that the oodles of nameservers on the Internet all have a share in the job: every nameserver is in charge of knowing only where a small chunk of the Internet is.
DNS servers do a good deal more than just answer queries from E-mail servers, but those tasks are not important as far as Post.Office is concerned. From a mail servers perspective, DNS servers answer requests from hosts regarding:
Simply put, a nameserver helps a mail server such as Post.Office convert the Internet domain name in an E-mail address into a TCP/IP address. Once Post.Office knows another computers TCP/IP address, it is able to contact it and forward messages to it.
The following example (which again assumes a computer name of yourPC and a company name of Acme) illustrates the functioning of the DNS. Lets say Jane Doe wants to send an E-mail message to a user in your domain (e.g. user@Acme.com).
At the top level, on the Internet backbone, there is a gargantuan server that knows the location of every DNS server containing domain information for *.com (* being a wildcard). The mail server on Janes host (this could be another copy of Post.Office) asks Janes host to query the backbone server for information about the domain Acme.com. The backbone server responds that the domain is handled by a DNS server located on the host nameserverhost.Acme.com.
Janes host then asks the DNS server on nameserverhost.Acme.com for information about the domain Acme.com. The DNS nameserver on nameserverhost.Acme.com receives the request, checks its records, and sends a response to Janes host. The information in the response (the "MX" and "A" records) indicates that all mail for the domain Acme.com should be directed to the host yourPC.Acme.com. In addition, the TCP/IP address for yourPC.Acme.com is provided.
With this TCP/IP address, Janes host can direct the message to yourPC.Acme.com, where it will be received by your Post.Office and delivered to user@Acme.com.
In order to receive E-mail from the Internet, either "A" records" or "MX" and "A" records" are required. "MX" and "A" records tell E-mail servers on the Internet how to route E-mail. ("A" records have other purposes as well, but were only dealing with E-mail here.) You need to set up these records so that other mail servers can find your Post.Office host and forward E-mail to it.
Mail servers such as Post.Office use "A" records to convert host names into IP addresses. "MX" records are used to convert domains that do not point to any particular host into a Fully Qualified Domain Name, or to route messages for one host to a different host that is running a mail server. (This feature is significant as it allows you to use E-mail addresses that do not include the name of your host.)
"MX" and "A" records should be entered in the primary nameserver for your domain. All DNS queries regarding your domain are directed to that nameserver. Your primary nameserver uses the "MX" and "A" records that youve set up within it to tell querying computers how to route the mail to your Post.Office host.
If your ISP maintains your DNS records for you, they should be able to help you figure out how to set up correct records for your Post.Office host.
Setting up "A" records is simple; you make an entry in your DNS server that resolves your Post.Office hosts FQDN to its TCP/IP number. If you plan on including your hosts name on all the E-mail addresses in your system, setting up an "A" record is all you need to make sure that other computers on the Internet will be able to forward E-mail to you. "A" records look like this:
host.yourdomain. your_hosts_IP_number(##.##.###.##) |
The "A" record for our example would look like:
myPC.Acme.com. IN A 123.45.6.78 |
If you are going to use E-mail addresses that do not include your hosts fully qualified domain name (in other words, if you plan to use lost name hiding), you will need to establish "MX" records in your DNS server in addition to your "A" records. The "MX" records will instruct querying computers to forward all messages for your domain (Acme.com) to your Post.Office host (yourPC.Acme.com).
"MX" records are the recommended form of DNS entry for mail service. All mail servers look for "MX" records first in their search to identify an external mail host. In addition, "MX" records support the concept of priority. Priority rankings enable you to identify backup mail servers by inserting additional records in your DNS nameserver.
The figure below illustrates how "MX" records should be set up, both for your Post.Office hosts domain as well as for any virtual domains that you may want to set up.
MX records: yourdomain. IN MX 10 host.yourdomain. |
A virtual domain is any domain besides the hosts domain for which you configure Post.Office to receive messages (you can set up as many virtual domains as you like). We refer to such domains as virtual domains since there need not be any physical hosts in these domains.
MX records: virtualdomain. IN MX 10 host.yourdomain. |
Simple "MX" records for our sample company might look like this:
Acme.com. IN MX 10 myPC.Acme.com. |
The first two lines are the "MX" records for acme.com. They provide information about how to handle any messages addressed to acme.com (the addresses jane.doe@acme.com and john.deer@acme.com, for example). Without "MX" records, messages to addresses such as this would not be deliverable since they do not include a host name (an "A" record will suffice but there will be no backup if myPC is down).
In this case, the "MX" records specify that E-mail for acme.com should be sent to yourPC . The record also specifies that if this fails, (for example, if yourPC is down), mail should be sent to backupPC.ISP.net, where it will be queued until yourPC is available again. Mail servers will send messages to yourPC rather than backupPC whenever possible because of yourPCs lower value (10 rather than 20) compared to backupPC.
The last line is an "A" record, which you should include since some older mail software does not understand "MX" records. The "A" record points directly to the IP number for the host yourPC.
In order for these "MX" records to work, there will of course need to be "A" records for both yourPC and backupPC. The "A" record for yourPC is shown above, while the "A" record for backupPC is maintained by "ISP", the folks who are kind enough to provide a backup for yourPC.
The ability to send mail, but not receive it is a likely indication that your DNS records are misconfigured. The successful sending of mail simply reflects that the recipients DNS records are in order. If mail cant find its way back to you, its probably because you have an error in the records identifying your mail server to the DNS. Be sure to check your DNS records carefully if you suspect this is your situation.
Post.Office ©Software.com, Inc. 1994-1997