Earlier today I posted http://blog.c7solutions.com/2012/10/creating-simple-exchange-server.html on how to create a transport agent in Exchange, and though the steps cover some of the detail for Exchange Server 2013 they do not cover some of the detail, so I’ve added that to this post below:
- Use .NET Framework 4.0 for Exchange 2013 though it is possible to write the agents using earlier versions of the .NET Framework. If you do use earlier versions then you need to update some of the config files on the server to state the version levels that you support and Enable Support for Legacy Transport Agents on Technet lists the steps for this.
- The Front End Transport role (which is installed on the CAS Server role) can support SMTP agents bound to events up to, but not including OnEndOfData.
- The Hub Transport role (which is installed on the Mailbox Server role) can support all SMTP agents except for those that bind to the OnConnect event.
- The Hub Transport role also support routing agents and delivery agents. The CAS role supports neither of these agent types.
- The Exchange 2013 Edge Transport Server role (expected with Exchange 2013 SP1) will support agents at the OnConnect event.
- To install a transport agent on a multi-role server (CAS and Mailbox on the same machine) then you need to use can use -TransportService Hub to the Install-TransportAgent cmdlet shown in the earlier blog if you want to bind the agent to the Hub Transport events. If you want to use the Front End Transport events (OnMailFrom to OnEndOfHeaders) then use –TransportService FrontEnd instead (updated 2 Oct from Philippe comment below).
- To install a transport agent on a CAS only server role you need to use local PowerShell and load the Exchange Management Shell snap-in with Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
- Finally, to view the agents in a given service, always state the service name or you will get back the Hub Transport service by default. For example Get-TransportAgent –TransportService FrontEnd for the agents bound to the Front End Transport service. Other values are Hub, Edge and MailboxSubmission and MailboxDelivery (though the last two don’t seem to work in the pre-release version on Exchange Server 2013.
We have a Transport Routing Agent that we’re porting to Exchange 2013 (it was developed on Exchange 2007, then 2010). That’s meant to run in the Hub Transport Service, and according to your 6th bullet point we should have used “-TransportService Hub” in the Install-TransportAgent cmdlet. However, I didn’t know about that, and although our test servers are CAS+Mailbox, the agent registered without it and runs fine. That seems to imply that “-TransportService” defaults to “Hub”. However the full help in PowerShell simply states that -TransportService is neither required nor has a default value. Am I missing something, or do you think I’m right about the implied default? Thanks, Philippe
@Philippe – I’ve not actually installed a multirole box during my testing so I’ve not seen if a default value is provided. But having just tested now on a mailbox server I see that I do not need to use -TransportService Hub, but of course if I needed to install the agent on the Front End Transport on a multirole box then I would need to use -TransportService FrontEnd. Though of course there is no harm in adding -TransportService Hub as it would be a way to stop the agent getting installed on CAS only servers.
No harm indeed, and I’ll add the option, although an installation on a Front End transport service wouldn’t work anyway in our case – the agent type is Microsoft.Exchange.Data.Transport.Routing.RoutingAgent, and that’s not supported there. Philippe