Saturday, November 1, 2008

Exchange Message Flow

Exploring Message Flow:

Microsoft Exchange Server 2007 supports various types of message flow. In an organization that deploys Exchange Server 2007, messages flow within a single Active Directory site or between multiple Active Directory sites. A Hub Transport server manages message flow in an organization by using various components in Exchange Server 2007. You can control the message flow among various servers and between the servers over the Internet by using SMTP Send and Receive connectors.

Types of Message Flow:
  • Inbound: In an inbound message flow, an Exchange Server 2007 organization receives an e-mail message over the Internet. A Hub Transport server or a gateway server, such as an Edge Transport server, accepts the message over the Internet and then routes the message to an internal Exchange Server 2007 server.
  • Outbound: In an outbound message flow, an internal Exchange Server 2007 server sends an e-mail message from within the organization over the Internet. A Hub Transport server processes and identifies the message as an outbound e-mail message. The Hub Transport server then sends the message over the Internet either directly or by using a gateway server such as the Edge Transport server
  • Local: In a local message flow, a Hub Transport server processes an e-mail message received by Exchange Server 2007 and then sends it to a mailbox in the same Active Directory site. Even if an organization has a single Mailbox server, all e-mail messages are routed through the Hub Transport server as part of the delivery process. Therefore, all Exchange Server 2007 organizations use local message flow
  • Remote: In a remote message flow, a Hub Transport server processes an e-mail message received by Exchange Server 2007 and then sends the message to a mailbox in a different Active Directory site. Remote message flow takes place only if an organization has multiple Active Directory sites with Mailbox servers. Typically, small organizations and large organizations with centralized Mailbox servers in a single data center do not use remote message flow.


Components Used in Message Flow:


Message transport in Microsoft Exchange Server 2007 involves the interaction of various components :

  • Microsoft Exchange Mail Submission service:

    The Microsoft Exchange Mail Submission service is a notification service that runs on Mailbox server roles in Exchange Server 2007.

    When a message becomes available for retrieval in the Outbox folder of a sender, the Microsoft Exchange Mail Submission service notifies a Hub Transport server in the local Active Directory site. If there are multiple Hub Transport servers in the site, the Microsoft Exchange Mail Submission service evenly distributes notifications among all the available Hub Transport servers.

    When the Microsoft Exchange Transport service starts on each Edge Transport server or Hub Transport server, the categorizer creates the local submission queue.
  • Store driver: The store driver on the Hub Transport server role retrieves the message, which is in MAPI format, from the sender’s Outbox folder and converts it to the Summary-Transport Neutral Encapsulation Format (S/TNEF).

    S/TNEF is a type of Transport-Neutral Encapsulation Format (TNEF), which has no plain text part and is in eight–bit binary format. The store driver then submits the message to the submission queue and moves the message from the Outbox to the Sent Items folder.
  • Submission queue: Messages can also enter the submission queue on a Hub Transport server from an SMTP Receive connector or from the Pickup directory. The submission queue stores all messages on disk until the categorizer processes them.
  • Categorizer: The categorizer processes the messages one at a time and always selects the oldest message in the submission queue first. On an Edge Transport server, the categorizer verifies the recipient SMTP address of an inbound message and places it directly in the delivery queue.

    The message is then routed to a Hub Transport server. On a Hub Transport server, the categorizer processes all inbound messages based on the information about the intended recipients. The categorizer makes copies of messages that have multiple recipients, determines routing paths, converts content format, and applies organizational message policies.

    After the categorizer processes the message, the message is removed from the submission queue.

SMTP Connectors:

You need an SMTP connector to route messages between two Active Directory sites or between two Active Directory sites over the Internet. However, you do not need SMTP connectors to route messages within an Active Directory site. You can use an SMTP connector to route messages between Hub Transport servers and Edge Transport servers or between the Hub Transport servers over the Internet. Each Hub Transport server and Edge Transport server can have SMTP connectors to send or receive messages.

To manage the message flow in your organization, you can use the default configuration of the SMTP connectors that is provided by Exchange Server 2007. Based on the requirements of your organization, you can also configure the properties of SMTP connectors. You can specify the source IP addresses that should send or receive messages. You can also specify the maximum size of messages and configure permissions. In addition, you can enable protocol logging on an SMTP connector to identify the problems in the message flow.

Types of SMTP Connectors:

  • Send: A computer that runs Exchange Server 2007 requires an SMTP Send connector to send any SMTP e-mail message. You need SMTP Send connectors to send an e-mail message to any SMTP server over the Internet or to any SMTP servers in your organization. By default, SMTP Send connectors are not configured on a Hub Transport server. However, SMTP Send connectors are dynamically created in the server memory to communicate with other Hub Transport servers on other sites. You cannot configure these dynamically created SMTP Send connectors or view them by using the management tools in Exchange Server 2007.

    When you create an SMTP Send connector, you must configure it with a Domain Name System (DNS) address space, which is used to identify the messages that are processed by the SMTP Send connector. For example, if you configure an SMTP Send connector with the contoso.com DNS address space, all messages with a destination address in the contoso.com domain will be processed by that SMTP Send connector. After you configure the DNS address space, you can configure the SMTP Send connector to deliver messages by looking up the mail exchanger (MX) records in DNS or to forward messages to a smart host.
  • Receive: A computer that runs Exchange Server 2007 requires an SMTP Receive connector to accept any SMTP connection. An SMTP Receive connector enables a Hub Transport Server or an Edge Transport server to receive e-mail messages from other SMTP servers. These SMTP servers can include servers on the Internet, other Exchange Server 2007 Hub Transport servers, or Edge Transport servers.

    You can configure multiple SMTP Receive connectors with different parameters on a single Exchange Server 2007 server. Small-to-medium-size organizations may use only the two default SMTP Receive connectors. Large organizations may need multiple SMTP Receive connectors on a single server or on multiple servers. The default SMTP connectors manage the message transport within the same Active Directory forest. Therefore, you do not need to create SMTP Receive connectors to route e-mail messages between Hub Transport server in the same Active Directory forest.

    You must configure each SMTP Receive connector with: A port number on which the connector will receive connections. The local IP addresses that the SMTP Receive connector will use for incoming connections. A remote IP range that can send e-mail message to the SMTP Receive connector. The combination of these three properties must be unique for every SMTP Receive connector in your organization

SMTP Default Configuration:

By default, the following SMTP Receive connectors are created on each Hub Transport server:

  • The Client Receive Connector that receives connections from SMTP clients, such as Microsoft Office Outlook Express
  • The Default Receive Connector that receives connections from other SMTP servers by default

    The default configuration for the two connectors is similar, but with one important difference: the Client Receive Connector is configured on port 587 rather than port 25. This is because the Internet Engineering Task Force (IETF) working group process in Request for Comment (RFC) 2476 has proposed that port 587 should be used only for message submission from e-mail clients that require message relay.

Message Flow Scenarios:

  • Single Site: Message flow within a single site begins when you submit a message to the message store on an Exchange Server 2007 Mailbox server.

    When you use Microsoft Office Outlook, the message is written in MAPI format and then sent to your Outbox folder. The Microsoft Exchange Mail Submission service detects that a message is available in the Outbox folder and notifies the store driver on an available Hub Transport server.

    The store driver connects to your Outbox folder by using MAPI and retrieves the message from the Mailbox server. The store driver also places the message in the submission queue on the Hub Transport server, and moves the message from the Outbox folder to the Sent Items folder.

    The categorizer processes the message in the submission queue. If a message is intended for a Mailbox server role in the same Active Directory site, the categorizer places the message in a local delivery queue.

    The store driver then delivers the message to the Mailbox server role by using MAPI.
  • Multiple Sites:
    In a multiple-site message flow, after a message is retrieved and delivered to the Hub Transport server, the Hub Transport server searches the Active Directory to determine the mailbox location of the recipient. Then, the Hub Transport server determines the lowest cost route to the destination site by using the Active Directory site link information.

    If Hub sites have not been configured in the route to the destination site, the message is directly delivered to a Hub Transport server in the destination site. This is called Direct Relay Routing.

    The Hub Transport server of the destination site then delivers the message to the Mailbox server in that site. If a message has to be delivered to recipients in multiple sites, the message is delivered to a Hub Transport server in each site. If a message has to be delivered to recipients through the Internet, the Hub Transport server routes the message to an Edge Transport server.

    The Edge Transport server delivers the message to the appropriate Internet e-mail server, which in turn delivers the message to the recipient. In the absence of an Edge Transport server, the Hub Transport server delivers the message to an appropriate third-party Internet e-mail server by using an SMTP Send connector.
  • Disrupted:
    A message flow is disrupted if no Hub Transport server is available in the destination site. In such a situation, the message is routed to the closest Hub Transport server along the most optimal route. This is referred to as Queuing Messages at the Point of Failure.

    The closest Hub Transport server then delivers the message when a Hub Transport server in the destination site becomes available. If a message has to be delivered to recipients at multiple sites, a copy of the message is delivered directly to the recipients at each site.

    However, if destination Hub Transport servers are not available, then the source Hub Transport server delays making copies of the message for each recipient and sends a single message that is queued for delivery at the Hub Transport server that is closest to the destination sites.

    When the destination sites become available, the queued message is sent to each site with a recipient. This is referred to as Delayed Fan-Out Routing.