Organization: China Interactive Publishing Network (http://www.china-pub.com/)
RFC Document Chinese Translation Program (http://www.china-pub.com/compters/emook/aboutemook.htm)
E-mail: Ouyang@china-pub.com
Translator: Anpengwang Anpengwang@263.net)
Translation time: 2001-5-1
Copyright: This translation document can be used for non-commercial use free reprint, but the translation and organizational information of this document must be retained.
Network Working Group Craig PARTRIDGE
Request for Comments: 974 CSNET CIC BBN Laboratories Inc
January 1986
Mail routing and domain name system
(RFC974 Mail Routing and the Domain System)
Memorandum state
This RFC document describes how the mail system on the Internet is based on the domain name system (see RFC882, 883 and 973)
Information Send Messages. The propagation of this memorandum is unlimited.
Introduction
The purpose of this memo is to clarify how the mail is determined by the sending path of a given Internet domain address.
by. These include discussions about MX RR on the mailing party, MX RR is used for message routing. Attention, this memission
The record does not involve the statement of how the mailing process handles the statement of MB RR and MG RR, which is used for the explanation of the mailbox name.
Some ideas for email addresses in RCF 882 and RFC 883 have changed. It can generally be considered
The address of the message is a mailbox - such as loki.bbn.com, just open a pair of loki.bbn.com
The SMTP connection can be sent forward. This system does not apply to certain specific situations, such as no direct access to the Internet
Specific UUCP and CSNet hosts, but these hosts can be handled as special circumstances in the configuration file (such as
Most postals are set to automatically forward mail sent to CSNET to CSNet-Rlay.arpa).
In the domain name system, the connection to the loki.bbn.com is not simply opened, but must be sent to the domain name system
How to deliver the message for loki.bbn.com. Domain name system may guide the postman to pass the message to a completely different
The host, such as Sh.cs.net. Or in more complicated situations, the mailing may know that it has one to
Loki.bbn.com's path can be selected. This memorandum is mainly described on this more complicated situation.
Some guidelines for work.
I hope the reader is already familiar with RFC 882, RFC 883 and their updated versions (such as RFC973).
table of Contents
Domain server knows what 2
Route Principle Overview 2
Determine the message to send to 1 3
Query 3
Explain MX Resource Record List 3
Secondary special issues 4
Example 5
What is the domain server?
The domain name server saves the information as a series of resource records (RR), each record contains
A specific information fragment of a domain name (usually but not necessarily a host). Can simply record the resource record
According to representatives, each domain name matches the corresponding data, and other type information is stored to help the system determine.
Related to the resource record. In order to determine the message route, the system stores a resource record called MX RR. Each MX
A domain name corresponds to two data: priority (16-bit unsigned integers) and host name. The priority value indicates that the mailing is mailed.
The sending order of the message is passed to the MX host, and the number minimum MX is first sent. Allows multiple MXs to have the same priority, and they have the same priority.
In addition to mail information, the server also stores other types of resource records, and the mailing may encounter or choose to use.
These RRs. These include: Normative Name Resource Record (CNAME), which means that the domain name of the query is actually another domain.
The alias of the name, and CNAME is a strict or standard domain name; well-known service resource record (Well Known
Service, WKS, save the network service (such as SMTP) information supported by the domain name.
Route Principle Overview
Before how to explore the postman how to choose a mail route, it seems necessary to give a solution discussed in this memo.
Brief Overview of Routing Selection Problem.
Article 1 The main principles come from the priority fields defined in the MX record, and the purpose is to avoid loop mailing. If you post
The host's host is also included in the MX of the target host, and the mailing can only give the priority value to the MX transmitted by the MX in the host.
Routing information is outdated or informally, it may also cause loop mailing. The problem will only be sent when the problem is changed when the domain is changed.
Born, because those affected hosts will only know after their analyzer cache timeout. As long as you don't ask
The mailing and its analyzer must ask the authoritative server and never use the data in the cache.
Such problems will happen. And this method is unreal, because the cache of the analyzer will cause the email very expensive.
In addition, as long as the assignment host (those in the MX list) analyzer cache is refreshed when the domain table changes, it will not happen.
Resource records an outdated issue. In order to say, as long as there is appropriate precaution, the circular mail problem brought by domain information is completely
It can be avoided or the mailing is required to query the authoritative server. (Appropriate precautions is to add the host to the MX list
Before, the host administrator is checked. )
The problem of incomplete data is also required to pay attention when processing domain queries. If the reply segment of the query is incomplete, it may miss it.
Key MX resource records. This may cause a loop mailing, or information gives a label that cannot be posted.
Therefore, the mailing can only accept the response of the domain system that provides a complete reply segment. Note that as long as the virtual query is used
The loop can completely avoid this problem. However, because this situation rarely occurs, and the preferred way to interact with the domain system is
Data report, the application may only need to ensure that the mailing is repeatedly reused using the virtual loop until the truncated
data.
Where is the message to be sent?
Based on such a problem discussion and explain how the mail is determined by the message: the domain name is the local host
The sender tries to post a message, the address of the message is the domain name Remote. Assume that local and transote are correct
Domain name. In addition, it is assumed that local is the official name of the host where the mailing is located (ie, not an alias).
Query
The first step of the local mail is to query the REMOTE MX resource record. Strongly asked the post to try to send each time
Do this step when sending a message. The aim is to ensure that the mailing can use the change of the domain database in time, so
Complete host, domain administrator can reset the route by simply modifying its domain database for the message
(Route).
There are several query responses that are considered an error:
1. The query is no response. The domain server of the mailing query has no reply (different from the result of the query result, then
Not an error).
2. A response is set to the head truncation field. (Review the discussion of the incomplete query). Postman
You may not be able to use such a reply, you should use the virtual loop instead of the datagram repeated query.
3. Get the response of the response code non-zero.
The mailing should handle errors reasonably. There is no indication how to handle various types of errors, but the applicant's different types of errors may need to be taken. For example, the response code "domain does not exist" may need to treat the message as invalid and return
Gift, and the response code "server failure" may cause a later resend message.
There is still other special situations. If the result of the response is a CNAME resource record, this indicates that Remote is real
Alternatively an alias for another domain name, you need to use the specification domain name to re-query.
If the response does not include an error, there is no alias, answering segment should be a domain name Remote (such as
Remote is an alias is its true name) MX resource record list (length may be 0). Next
The section will explain the explanation of the table.
Explain a list of MX resource records
Note: This section discusses how the mailing will select the destination name delivered from the resource record list, no discussion
How to really perform posts. Whenever mentioned messaging, it means that the mail is issued to the necessary operations.
Turning a remote site for a given domain name. (For example, the SMTP mailing will first try to get the address of the domain name, including the package
Including additional queries in the domain system, and then the connection to the SMTPTCP port is established if the address is obtained. through
Over the network transmits messages to a specific mechanism of addresses related to the given domain name beyond the scope of this memo.
The MX list in the query response may be empty, which is a special case. In this regard, the mailing should treat empty tables as a package
With a resource record, the priority value of this MX resource record is 0, the host name is Remote (That is, REMOTE
It is also its only MX). In addition, the mailing does not need to further handle the resource record table, but should directly put the message.
Delivery to Remote. This consideration is to root root in the case where we cannot provide any information of the host name in the field.
It is speculated that the news is passed.
If the table is not empty, the mailing should follow the steps below from the list to delete the unrelated resource record, pay attention to the order
Very important.
To send WKS queries for each MX to see if the listed domain names do support the required mail service. area
MX resource records that do not support this service should be abandoned. This step is not required, but it is highly recommended.
If the domain name local is also listed as MX resource record, the priority value is greater than or equal to the priority value of LOCAL
All MX resource records must be abandoned.
Removing the list of unrelated resource records may also get empty. This situation is wrong, possibly by several reasons
to make. The simplest situation is that the WKS query discovers that the hosts listed do not support the required mail services. This will think that the news
Unable to pass, but some very stable mail systems may be transferred first before returning to this message.
Remote's address (if there is such an address). Another more dangerous may be that the domain system is considered to be Local
In handling messages to Remote, the posts on LOCAL are not ready to process mail to Remote
Part. For example, if the REMOTE MX listed by the domain system is only a record, local will clear the list.
air. But the local query domain system is probably because it does not know how to handle the address of the address. Obvious
In some places have an error. How to deal with this situation depends to a specific implementation to a certain extent, thus left
User is judged.
If the MX resource record list is not empty, the mailing will be in order (priority), please send the message to each
MX. The mailing is required to be as transmitted to the minimum of the priority value. Encourage applicants to prepare posters to sequential for each MX
Try until a MX receives a message or tries all MX. For some systems that are not particularly demanding, only
It is also reasonable only to try only a certain number of MX. Note that there may be multiple MXs have the same priority. At this time,
MX with higher priority values must continue after trying all MX with this priority value. In addition, several MXs may have a minimum priority, and they must be full before confirmation messages cannot be passed.
Department trial.
Secondary special issues
In order to avoid complication, the discussion of the previous section did not involve two special issues. There is no discussion here for them.
Special order.
A wildcard name with characters "*" may also be used for mail routing. The server on the network is likely to be simple.
Emails of a domain have to be forwarded. For example, when writing in this document, all the essays IL host
The email is sent through the relay.cs.net. This is achieved by establishing a resource record with wildcard.
Record indicates "* .il" MX with relay.cs.net. This should be transparent to the mail, because the domain server
The matching wildcards are hidden (such as huji.il and * .il match, the resource record returned by the domain server will include
Huji.il, not * .il). If some accident, the resource record received by the mailing is in the domain name or data segment.
Introducing a card, you should abandon the resource record.
It should be noted that if Local has an alias and this alias appears in the REMOTE MX record column
In the table (such as Remote, there is an MX called Alias, and Alias's CNAME is LOCAL, which will break
Bad delete an algorithm for unrelated resource records. Just guarantee that the data segment recorded in the MX resource record can avoid this
A problem.
Applicants should understand the query and the explanation of the query is only listed on Remote.
MX resource record repeatedly query. You can't try to construct a MX chain to support more complex mail routing. (such as,
Unix.bbn.com is a MX for the relay.cs.net, while the relay.cs.net is. IL on all hosts
MX, but this does not mean that unix.bbn.com will assume the responsibility of putting the mail .il. )
Finally, pay attention to this is a standard that selects routes on the Internet. For host services distributed on multiple networks
Posts may have to make decisions for which network transfer is used. Such a decision exceeds the scope of this memorand, although
Posts can also use domain system help selection. However, as long as the mail is decided to use the Internet delivery message, it must be
Select the message route based on these principles.
example
As further explanation of the above discussion, three mailing selection message routings will be held. These examples use the following
Database:
A.example.org in mx 10 a.example.org
A.Example.org in mx 15 B.Example.org
A.Example.org in mx 20 c.example.org
A.Example.org in WKS 10.0.0.1 TCP SMTP
B.Example.org in mx 0 B.Example.org
B.Example.org in mx 10 c.example.org
B.Example.org in WKS 10.0.0.2 TCP SMTP
C.Example.org in mx 0 c.example.org
C.Example.org in WKS 10.0.0.3 TCP SMTP
D.example.org in mx 0 d.example.org
D.Example.org in mx 0 c.example.org
D.Example.org in WKS 10.0.0.4 TCP SMTP In the first example, the SMTP mailing at D.Example.org tried to pass an address standard as
A.Example.org message. In the results of the query, it learned that there is three MX resources in A.Example.org.
recording. D.Example.org is not in these MX resource records, and three MX support SMTP mail (take
Due to the WKS item), therefore did not exclude one MX. Because A.Example.org is the lowest priority MX, post
The sender is forced to try to send it to a.example.org. If you can't reach A.Example.org, you can (but not
Must be to try again; if B.Example.org still does not respond, you can also try again.
C.Example.org.
In the second example, the mailing is on B.Example.org, and it is also to transmit the address as
A.Example.org message. This time A.Example.org also has three MX resource records, and the difference is
The sender must abandon its own MX resource record and the resource record of C.Example.org (because
C.Example.org MX resource record priority is higher than B.Example.org. This a.example.org
There is only one resource record, and you can only try to pass it to a.example.org.
In the third example, consider the mailing person on a.example.org to pass on D.Example.org
news. In this case only two MX resource records and the priority value is the same, each MX can be
D.Example.org receives the message. The mailing can try one first (which one depends on the post ", but
D.Example.org seems to be more reasonable, if the transfer fails, try another (such as c.example.org).
RFC 974 Mail Routing and The Domain System Mail Routing and Domain Name System 1/5
1
RFC Document Chinese Translation Program