Using connectors, the Microsoft Exchange Server MTA can route messages to the following:
Two processes are involved in determining what connector is used to send a message ¾ routing, which determines what connectors can deliver the message, and selection, which determines which of these connectors is the fastest or least costly connector to use. Often, selections are made to balance loads among servers. Connectors and Address Spaces
Messages to other systems are routed to connectors using the address type appropriate to the receiving system, such as an SMTP address for a message traveling through the Internet.
The path a connector uses to send messages outside the site is represented by an address space. The address space identifies the address types associated with the foreign system as well as some DDAs.
Each connector must have at least one address space. As shown in the following example, the sender is using Internet Mail Service to establish a link to the company's West coast Internet provider. The Internet Mail Service address space type is SMTP, and the address is *.com. The MTA uses the Internet Mail Service only to process SMTP messages addressed to recipients with the .com domain identifier. Notice that the message with the *.edu address is not processed even though it is an SMTP address.
For more information about address spaces, see Microsoft Exchange Server Concepts and Planning and Microsoft Exchange Server Operations. Gateway Routing Table (GWART)
Associated with each connector is an address space (or spaces), the cost of using a particular route, and possibly a connected site (or sites). Each connector can have one or more connected sites associated with it. These associations are used to generate the GWART. The GWART is replicated throughout the organization so that each server computer is aware of all possible routes. An enterprise-wide GWART is created in each site by the Routing Information Daemon (RID), which uses local information and replicated site GWARTs to build a consolidated local GWART. Address space and connected sites information is defined in the Address Space and Connected Sites property pages in the Microsoft Exchange Server Administrator program.
Each line of the GWART indicates an available routing path. You can view the contents of the GWART, including the address type each connector routes, in the Routing property page of the Site Addressing object as shown in the following illustration.
When a message is sent, the MTA scans the GWART and compares the recipient's address type with the address spaces in the GWART. It chooses connectors with address spaces similar to the recipient's address. If more than one connector can send the message, a connector selection process determines which connector is the most efficient to use. This determination is based on a number of factors. If no connectors can service the address space, the message is returned to the originator with an NDR.
Each time a connector or group of connectors meets the initial selection criteria, it is passed to the next step in the selection process. Each step applies to MTA-to-MTA connections, which include the X.400 Connector, the Dynamic RAS Connector, and the Site Connector. You can adjust some of the settings that are used in this selection process. Connectors and gateways for foreign systems are chosen only on the basis of the address spaces they process and the address space cost.
The following illustration shows how the MTA selects a connector.
Check for X.400 1984 Connector. Eliminate this connector if it is an X.400 1984 protocol connector, and the message has not been downgraded to the X.400 1984 protocol.
Check for looping message. Eliminate the connector if the message was just received from that connector.
Check message size and destination. Eliminate connectors according to message size and destination constraints.
Compare open retry count to maximum open retries. Each connector has a maximum-open-retry counter and an open retry timer that is configured in the Administrator. Connectors that have an open retry count less than the value set for maximum open retries.
The maximum open retries count specifies the number of times the system can attempt to transfer a message through that connector. Site Connectors use a site-wide configurable value. The open retry count is the number of times the MTA has attempted to transfer a message using a specific connector. The open retry count for each connector is stored in the message in question and is updated during rerouting.
Choose active connectors. Site Connectors, Internet Mail Service, and Microsoft Mail Connectors are always active. Other connectors have activation schedules, including the X.400 Connectors and Dynamic RAS Connectors. There are four activation states. They are, in order of preference:
The activation states are processed in the following order:
Choose connectors with low retry counts. The open retry count starts when the connection to the remote MTA fails. The connector attempts to establish the connection again when the Open Retry timer expires. The number of times the connector attempts the connection is based on the configuration of the Max Open Retries counter. The open retry counts are compared to each other, and connectors with the lowest number of open retries are chosen.
If the initial attempt to open an association fails, a timer is started (with a length defined as Open Retry) for the association control block (ASB) handling the original association. After the timer begins, another attempt to open an association is processed for that ASB. The process is repeated for each connector until the maximum open retry count is reached. After the maximum number of retry counts has been used on all available connectors, an NDR is issued for the set of recipients for which that connector was to be used.
Choose connectors that have not failed. Each MTA maintains an Open Retry timer for each connector that is on the same server. Connectors on other servers skip this step. Any connector that is not in a retry state is chosen. The open interval value determines how long the connector waits before attempting the connection again. This prevents the MTA from routing a message to a connector that failed the last time it tried to establish a connection.
For example, if you are using a Site Connector and Dynamic RAS Connector and the local area network (LAN) is down, a message is routed to the Site Connector because it has a lower cost. The connection fails because the LAN is down, so the message is routed to the Dynamic RAS Connector. The next message to arrive before the open retry timer expires on the Site Connector is routed directly to the Dynamic RAS Connector.
Compare costs. Connectors with the lowest cost are chosen first. You specify the costs when the address spaces are determined for each connector.
Choose local connectors. A local connector can send the message directly to the remote site. The MTA selects local connectors first to avoid an extra hop to the remote MTA in the site. Remote connectors require the MTA to pass the message to a messaging bridgehead server before the message can be passed to the remote site. Using local connectors reduces the need for additional processing power and bandwidth to transmit the message.
Site Connectors are counted as local if they are not homed on any particular server; otherwise the Site Connector has an actual location. If a Site Connector is remote (as indicated by the Home-MTA attribute), it means that the connector exists on another MTA within this site (that is, the message is routed to that Microsoft Exchange Server MTA). Otherwise, no connectors exist to service this address space, and the message is marked an NDR for this recipient.
Balance connector load. After the final group of connectors has been chosen, the MTA randomly chooses one of the connectors in the final group (because they all have equal cost) rather than calculating current queue size, message size, and so on.
After a connector has been routed for a message recipient, it is preferentially routed again when that connector is found in a subsequent recipient's final connector group. This prevents a message for multiple recipients from being routed to the same connector group (because one message has been split into several messages). The first connector chosen from a group is used for later recipients.
If a Site Connector is selected, the Microsoft Exchange Server MTA balances the message load among target MTAs through cost-weighted randomization. However, cost 0 target MTAs are always tried first and cost 100 target MTAs tried last. Cost-weighted randomization takes place only after routing has been attempted to all of the cost 0 target MTAs. All administrator-designated target MTAs are tried on that Site Connector before the message is rerouted to a different connector.
For more information about target MTAs and connection costs, see Microsoft Exchange Server Concepts and Planning and Microsoft Exchange Server Operations.