Skip to content
Tommaso Toniolo edited this page Apr 29, 2024 · 8 revisions

Introduction

This repository shows how to implement various types of Exchange Transport Agents that interacts with the transport pipeline.

Transport Agents can execute at different stages of the Transport Pipeline and, depending on which stage they are called, offer different possibilities. Refer to the picture below to understand what are the transport events which could be enriched by your custom code.

image

Disclaimer

This code is sample code. This sample is provided "as is" without warranty of any kind.

Microsoft and myself further disclaims all implied warranties including without limitation any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the samples remains with you. In no event shall myself, Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the samples, even if Microsoft has been advised of the possibility of such damages.

References

For more details on Transport Agents you can refer to the official Microsoft documentation here.

For the chronologically order list of events that are triggered, please refer to the official documentation here.

More details

In this Wiki you'd find for each sample included in the Transport Agent repository a description of what each does.

The sample includes:

  • AutoResponderAgent: Sends an automatic response to emails directed to a mailbox or address that is being deprecated/removed
  • DomainReroutingAgent: Rewrite the routing domain to be a differnt one (can be used to re-route traffic via a specific send connector matching the domain name space) when the sender is one of the configured ones
  • HeaderAgent: Insert a custom header with a custom value in the header of every message that traverse the mail server
  • HeaderReroutingAgent: Rewrite the routing domain to be a differnt one (can be used to re-route traffic via a specific send connector matching the domain name space) when a specific header is present in the message
  • InspectingAgent: Can be used to dump on event log information about the processed messages; this will write P1 (envelope), P2 (message) and header information
  • NDRAgent: Drops Non-Delivery Report (NDR) that contains in the body the word "DELETE"
  • RecipientDomainRewriteAgent: For any message sent to an address whose domain part is "contoso.com", it redirect the message to the same recipient on domain "tailspin.com"
  • SenderDomainRewriteAgent: For any message received from an address whose domain part is "contoso.com", it changes the sending domain and make the message appear from "tailspin.com"
  • TaggingAgent: Redirect a message to somebody+text@domain to somebody@domain, implementing Plus Addressing
Clone this wiki locally