SMTP Routing in Exchange 2010
The Hub Transport and Edge Transport servers’ main purpose is to transport, or route messages between sender and recipient, or between different systems on the way from sender to recipient. SMTP routing is used when the Hub or Edge Transport server determines that the next hop is an intermediary Hub Transport server between the current server and the mailbox server, or when the recipient has an SMTP address external to the organization. SMTP routing refers to the process Exchange uses to determine how to pass a message to the next server along the way to the final destination.
Routing Decisions
When the Hub or Edge Transport server receives a message for processing, it must use a component called the categorizer to determine how to handle the message. The categorizer is a part of the Microsoft Exchange Transport service. When a transport server receives a message that message is submitted to the submission queue, which moves the message through the categorizer as follows:
- Agent processing for submitted messages can include any installed agents such as Forefront Protection for Exchange or other antivirus software, or a journaling agent for message archiving.
- Recipient resolution determines whether the recipient is internal or external to the Exchange organization.
- Routing determines both the final destination and the next logical hop in the message flow.
- Content conversion can then take a message in one format, such as MAPI, and convert it to another more appropriate format for the final destination, such as MIME.
- Agent processing for routed messages can include transport rules, address modifications, etc.
- Message packaging and DSN creation moves the message to the appropriate queue and creates a Delivery Status Notification. If the Hub Transport server is also a mailbox server hosting the recipient’s mailbox, this will include delivery to the recipient.
Once the categorizer has processed the message, it will be handled by the appropriate next component. This can be the SMTP Send, a store driver, other delivery agent, or a foreign gateway connection. For each next hop, a dynamic delivery queue is created unless the message is undeliverable, in which case it is submitted to the Unreachable queue.
Routing Components
There are several important components that go into making a routing decision. Exchange 2010 will use information stored in Active Directory (or copied from AD into LDS in the case of an Edge Transport Server) to make a routing decision. These include:
- Active Directory Site topology which is stored in the application partition of Active Directory.
- Active Directory IP site links-Exchange 2010 will route internal messages along the same pathways as your AD site replication links.
- Send connectors – These are SMTP send connectors created for exchanging email between other SMTP systems.
- Delivery agents-used to route mail to non-SMTP systems.
- Foreign connectors-used to drop messages into a file share for processing by other systems.
- Routing Groups and connectors-used to move messages into a legacy Exchange 2003 system.
- The Microsoft Exchange Transport service-controls SMTP delivery
- The Microsoft Exchange AD Topology service-finds and retrieves data from the local domain controller and global catalog server(s) in the same site.
- Routing tables – Created dynamically and cached to improve routing decision performance.
- DNS – Used to determine the MTA for external addresses and to find the IP address of next hop destination servers.
- SMTP – Used to move messages between Hub and/or Edge transport servers, or external SMTP systems.
- RPC – Used to deliver messages to mailbox servers in the same AD site.
Active Directory Sites and Site Links
When routing messages within an Exchange organization, Exchange 2010 (and 2007) will try to make a direct connection to the Hub Transport server in the same site as the recipient’s mailbox server. If you want to use the same topology as your Active Directory site topology, you must designate one or more sites as a hub site. You use the EMS command Set-ADSite to do this.
In larger environments with multiple sites, there may be more than one replication connection defined in AD. When more than one pathway exists, Exchange 2010 will use least-cost routing to move the message as efficiently as it can. Exchange Hub Transport servers will use the costs of site links configured in AD to make routing decisions for how to move a message to the next logical Hub Transport server on the pathway to the mailbox server. If two or more paths exist and are of equal cost, the Hub Transport server will alternate between them. Otherwise it will use the least-cost path as long as it is available, and only fall back to the higher cost path when it cannot connect to the Hub Transport server(s) at the other end of the least-cost path.
In smaller organizations with only one site, the Hub Transport server will still make routing decisions, but will use Remote Procedure Calls (RPCs) to move messages to the appropriate mailbox server. SMTP routing will be used to determine the appropriate system to route outbound messages to. This can use DNS lookups to resolve the MX record for the destination domain, or an SMTP connector that defines an upstream smart-host may be used to specify the relay.
SMTP routing is a complex, but usually behind the scenes, process that ensures message delivery is as efficient as possible. The best things you can do to optimize this process is to ensure that your internal Active Directory Sites and Services configuration is kept up to date.


