Applies to: Exchange Server 2013
Topic Last Modified: 2012-09-25
Transport agents let you install custom software that is created by Microsoft, by third-party vendors, or by your organization, on an Exchange server. This software can then process email messages that pass through the transport pipeline. In Microsoft Exchange Server 2013, the transport pipeline is made of three different processes:
- Front End Transport service This
service runs on all Client Access servers and acts as a stateless
SMTP proxy to route messages to and from the Transport service on a
Mailbox server.
- Transport service This service runs on
all Mailbox servers and is virtually identical to the Hub Transport
server role in previous versions of Exchange. Unlike previous
versions of Exchange, the Transport service never communicates
directly with mailbox databases. That task is now handled by the
Mailbox Transport service. The Transport service routes messages
between the Mailbox Transport service, the Transport service, and
the Front End Transport service.
- Mailbox Transport service This service
runs on all Mailbox servers and consists of two separate services:
Mailbox Transport Submission and Mailbox Transport Delivery.
Mailbox Transport Delivery receives SMTP messages from the
Transport service, and connects to the mailbox database using an
Exchange remote procedure call (RPC) to deliver the message.
Mailbox Transport Submission connects to the mailbox database using
RPC to retrieve messages, and submits the messages over SMTP to the
Transport service.
Like the previous version of Exchange, Exchange 2013 transport provides extensibility through the Microsoft Exchange Server 2013 Transport Agents SDK. The Exchange 2013 version of the SDK is based on the Microsoft .NET Framework version 4.0 and allows third parties to implement the following predefined classes:
- SmtpReceiveAgent
- RoutingAgent
- DeliveryAgent
When complied against libraries in the SDK, the resulting assemblies are registered with Exchange 2013, which loads the agents and invokes their event handlers during specific stages of the SMTP sessions or message processing. These stages, or events, are part of the agent definitions. The agent registration information is stored in an XML configuration file.
The following list explains the requirements for using transport agents in Exchange 2013.
- The Transport service fully supports all the predefined classes
in the SDK, and therefore any third party transport agents written
for the Hub Transport server role in Microsoft Exchange Server 2010
should work in the Transport service in Exchange 2013.
- The Front End Transport service only supports the
SmtpReceiveAgent class in the SDK, and third party agents
can't operate on the OnEndOfData SMTP event.
- The Mailbox Transport service doesn't support the SDK at all,
so you can't use any third party agents in the Mailbox Transport
service.
Support for legacy transport agents based on versions of the .NET Framework prior to version 4.0 isn't enabled by default, but you can enable it. For instructions, see Enable Support for Legacy Transport Agents.
Contents
Updates to transport agent management
Updates to transport agent management
Due to the updates to the Exchange 2013 transport pipeline, the transport agent cmdlets need to distinguish between the Transport service and the Front End Transport service, especially if a Client Access server and a Mailbox server are installed on the same physical server. For more information, see Manage Transport Agents.
Transport Agent management cmdlets manipulate a configuration file located at %ExchangeInstallPath%TransportRoles\Agents. For the Transport service, the file is agents.config. For the Front End Transport service, the file is fetagents.config. Both files use the same format as in Exchange 2010.
Transport agents and SMTP events
Note that the information in this section is identical to the Exchange 2010 topic Understanding Transport Agents. In Exchange 2013, the categorizer exists only in the Transport service. SMTP Receive exists in the Front End Transport service, the Transport service, and the Mailbox Transport Delivery service.
Transport agents use SMTP events. These events are triggered as messages move through the transport pipeline. SMTP events give transport agents access to messages at specific points during the SMTP conversation and during routing of messages through the organization. The following tables list the SMTP events that provide access to messages in the transport pipeline.
SMTP Receive events
Sequence | SMTP event | Description |
---|---|---|
1 |
OnConnect |
This event is triggered upon initial connection from a remote SMTP host. |
2 |
OnEhloCommand |
This event is triggered when the |
3 |
OnHeloCommand |
This event is triggered when the |
4 |
OnAuthCommand |
This event is triggered when the |
5 |
OnEndOfAuthentication |
This event is triggered when the remote SMTP host has completed authentication. |
6 |
OnMailCommand |
This event is triggered when the |
7 |
OnRcptToCommand |
This event is triggered when the |
8 |
OnDataCommand |
This event is triggered when the |
9 |
OnEndOfHeaders |
This event is triggered when the remote SMTP host as completed submitting the email message headers. |
10 |
OnEndOfData |
This event is triggered when the remote SMTP host issues
|
** |
OnHelpCommand |
This event is triggered when the |
** |
OnNoopCommand |
This event is triggered when the |
** |
OnReject |
This event is triggered when the receiving SMTP host issues a temporary or permanent delivery status notification (DSN) code to the sending SMTP host. This event can occur at any time after the OnConnect SMTP event and before the OnDisconnect SMTP event. |
** |
OnRsetCommand |
This event is triggered when the |
11 |
OnDisconnect |
This event is triggered upon disconnection of the SMTP conversation by either a receiving or sending SMTP host. |
Categorizer events
Sequence | Categorizer event | Description |
---|---|---|
1 |
OnSubmittedMessage |
This event is triggered upon submission of a message into the Submission queues on the receiving SMTP host. |
2 |
OnResolvedMessage |
This event is triggered after all the recipients have been resolved, but before the next hop has been determined for each recipient. The OnResolvedMessage routing event enables subsequent events to override the default routing behavior by using the per-recipient SetRoutingOverride method. |
3 |
OnRoutedMessage |
This event is triggered after messages have been categorized, distribution lists have been expanded, and recipients have been resolved. |
4 |
OnCategorizedMessage |
This event is triggered when the Categorizer completes processing the message. |
Built-in transport agents
Most of the built-in transport agents included in Exchange 2013 are invisible and unmanageable by the transport agent cmdlets. All built-in transport agents in the Front End Transport service and the Mailbox Transport service are invisible and unmanageable. A few of the built-in transport agents in the Transport service are visible using the Get-TransportAgent cmdlet.