Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Topic Last Modified: 2009-12-17
Delivery agents are responsible for delivering messages addressed to foreign systems that don't use the SMTP protocol. Each delivery agent works with a Delivery Agent connector. When a message is routed to a Delivery Agent connector, the associated delivery agent performs the content conversion and message delivery. Delivery agents are a significant improvement over Foreign connectors in handling non-SMTP messages in your Exchange organization.
Looking for management tasks related to managing transport servers? See Managing Transport Servers.
A delivery agent is a custom agent that can:
- Establish a connection to the foreign system for message
- Retrieve messages from the remote delivery queues on Hub
- Deliver messages to the foreign system.
- Provide acknowledgement for each successful message
While the Foreign connector architecture remains in Microsoft Exchange Server 2010, we recommend using delivery agents for routing messages to non-SMTP systems whenever possible. Delivery agents provide the following benefits:
- They allow queue management of messages routed to foreign
systems using the familiar queue management tools.
- Because the messages no longer need to be written to and read
from the file system, message delivery performance is improved.
- They provide access to message properties with rich events for
- Development time for a delivery agent is faster than
implementing a Foreign connector because the delivery agent can use
the message representation and management features of Exchange.
- You can now be sure that the messages are delivered to the
foreign system as opposed to just being written to the Drop
- The usage of Delivery Agent connectors allows service level
agreement (SLA) analysis because it's now possible to track the
latency of message delivery to the foreign system.
Adding Delivery Agents to Your Organization
To use a delivery agent in your organization, you have to complete the following:
- Acquire the delivery agent. Typically, delivery agents are
written by third parties. Exchange 2010 comes with only one
Delivery Agent connector by default: the Text Messaging Delivery
- Install the delivery agent on your Hub Transport servers that
will act as source servers for the Delivery Agent connectors.
- Create a Delivery Agent connector for the specific
When all of these steps are completed, messages to the foreign systems will be routed through the Delivery Agent connectors and processed by the delivery agent.
Delivery Agent Connectors
Don't confuse the Delivery Agent connectors with the actual delivery agents. Delivery Agent connectors are configured to make routing decisions. The Delivery Agent connectors handle queuing messages to be processed by the delivery agents; much like Send connectors or Routing Group connectors are used for SMTP delivery.
Delivery Agent connectors ensure that the messages destined to the foreign system are inserted into the appropriate queues on the Hub Transport servers that are used for delivering messages to the foreign systems. After the messages are queued, Connection Manager invokes the delivery agent to handle the actual delivery of the message to the foreign system.
Events Used by Delivery Agents
Delivery agents act on the following events raised by the Connection Manager component:
- OnOpenConnection This event is raised
when there are messages in the queue to be delivered to the foreign
system. It notifies the delivery agent to initiate a connection to
the foreign system.
- OnDeliverMailItem This event notifies
the delivery agent to retrieve the next item from the queue.
- OnCloseConnection This event is raised
when there are no more messages in the queue to be delivered to the
foreign system. It notifies the delivery agent to close the
connection to the foreign system.
In a typical delivery scenario, the following interaction between Connection Manager and the delivery agent takes place:
- Connection Manager detects messages queued for delivery to the
- Connection Manager invokes the delivery agent using the
- The delivery agent establishes a connection with the foreign
system. After the connection is established, it notifies Connection
Manager using the RegisterConnection method.
- Connection Manager raises the OnDeliverMailItem
- The delivery agent retrieves the message from the queue and
delivers it to the foreign system. After delivery is complete, it
provides acknowledgement to Connection Manager.
- If there are additional messages in the queue, steps 4 and
5 are repeated until all messages are delivered.
- Connection Manager raises the OnCloseConnection
- The delivery agent closes the connection with the foreign
system and notifies Connection Manager using the
The following are the situations where messages or the entire Delivery Agent connector queue would end up in the Retry state:
- After Connection Manager raises the OnOpenConnection
event, if no delivery agents respond with the
RegisterConnection method, the entire queue for that
Delivery Agent connector is put into retry.
- If the delivery agent doesn't provide an acknowledgement for a
specific message, that message is put into retry.