Monday, 15 October 2012

Mail Flow in Exchange Server 2013

With the 2 Roles (Mailbox Server Role and Client Access Server) server architecture in Exchange Server 2013, few changes are there on the transport components where Microsoft merge the Hub Transport Server role component into Mailbox Server role and introduced a new Front End Transport service on the Client Access Server Role to handle the mail flow in Exchange 2013.

Exchange 2013 Mail flow occurs through a Transport Pipeline. Transport Pipeline is a collection of Services, connections, components and queues that work together to route all the messages to categoriser in the Hub Transport Service on a Mailbox Server Role.

Three Components of Transport Pipeline


Below are the three Transport pipeline components that performs an important functions on the mail flow part in Exchange Server 2013

Front End Transport Service:
This Service is available in Client Access Server roles; it acts as a proxy for inbound and outbound emails. Where it receives the email from external SMTP using the receive connector and it performs a Connection filtering, Recipient Filtering and Sender filtering and it will route the email to Hub Transport Service in Mailbox Server Role. Front end transport service won't store any emails in queue etc.

Hub Transport Service:
This Service is available in Mailbox Server Role; it performs the same function as the Hub Transport Server Role in Exchange Server 2010. Hub Transport Service performs the categorization, the connection filtering and route the emails to Mailbox Transport Service

Mailbox Transport Service: This Service is available in Mailbox Server role, this Mailbox Transport Service is responsible to retrieve the sent emails by the user and submit it to Hub Transport Service and also it is responsible to receive emails from Hub Transport Service and it will connect to Mailbox Database using RPC to deliver the emails.



Below figure shows the components that are available on each Transport Service and this image is copied from Microsoft website to explain the mail flow architecture in Exchange 2013.

To give a demo kind of explanation, I marked with 1 to 10 to represent how the external emails send to an internal user reaches his mailbox.



Step 1: Inbound Emails from external SMTP will be received by Receive Connector (SMTP Receive) on the Front End Transport Service. SMTP Receive perform a Connection Filtering, Recipient filtering and Sender filtering by the Protocol Agent and the emails will be delivered to Hub Selector. Hub Selector use the delivery groups to find where to deliver the emails based on the recipient and the emails will be sent to SMTP Send component on the Front End Transport Service

Step 2: SMTP Send component on Front End Transport Service performs email routing based on whether it is an internal email or an external email.

Step 3: In our case it is an inbound email. The SMTP Send component on the Front End Transport Service routes the emails to SMTP receive component on the Hub Transport Service on the Mailbox Server Role.

Step 4: SMTP Receive component on Hub Transport Service receives the email from Front end transport service and email from other Hub transport services. It has a Protocol Agent to inspect the emails content (Content filtering) and the email will be sent to Submission Queue.

Step 5: Submission Queue receive the email from 3 ways, 1. SMTP Receive component, 2.Pickup and 3.Replay Directory and the emails are sending to Categoriser on the first in first out basis

Step 6: Categorizer perform the same functions like recipient resolution, routing resolution and Content Conversion then the email will be place on the Delivery Queue.

Step 7: SMTP Send component on the Hub Transport Service pick the emails from Delivery queue and it will send the email to SMTP Receive component on the Mailbox Transport Service. Based on the Routing resolution that occurred on the categorizer, the email will be routed to the respective destination. It can be of local mailbox server of the Hub Transport service of other mailbox server.

Step 8: If the email is send to a mailbox on the same server, the email will be received by SMTP receive component on the Mailbox Transport Delivery Service and it will be delivered to Store Driver.

Step 9 and 10: Store Driver deliver in Mailbox Transport Delivery Service process the email and the Mailbox Transport service connect to Mailbox Database using RPC and the deliver the email to respective Mailbox.

Above gives a short explanation on how the inbound email flow to exchange organization occurs in Exchange 2013 organization. And the same way the outbound emails will be submitted to Mailbox Transport Submission Service and the emails will be routed to HUB Transport Service and then to front end transport service and it will be delivered to external SMTP host.

Please leave your comment if you need any other information on the Mail Flow on Exchange Server 2013.

1 comment: