Exchange 2013 default receive connectors

re-creating the default receive connectors on exchange 2013

I recently ran into a server that no longer wanted to route mail and responded with PRX4 and PRX5 temporary server errors after a failed upgrade with the latest CU.

These errors are attributed to dns problems, however in this case DNS was fine. Even after restoring a VM backup the problem persisted. The actual cause of the problem was a missing receive connector on port 2525, and that problem replicated back to the restored VM. Luckily the discussion here offered some discussion around the default connectors, and included the little gem below that recreates all the default exachange 2013 receive connectors in one go.

$range = "","::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
Get-TransportService | % {
	$server = $_.Name
	New-ReceiveConnector -Name "Client Proxy $server" -Bindings, [::]:465 -AuthMechanism Tls,Integrated,BasicAuth,BasicAuthRequireTLS,ExchangeServer -RemoteIPRanges $range -TransportRole HubTransport -PermissionGroups ExchangeUsers,ExchangeServers -MaxMessageSize 35MB -MessageRateLimit 5 -MessageRateSource User -EnableAuthGSSAPI $True -Server $server

	New-ReceiveConnector -Name "Default Frontend $server" -Bindings, [::]:25 -AuthMechanism Tls,Integrated,BasicAuth,BasicAuthRequireTLS,ExchangeServer -RemoteIPRanges $range -TransportRole FrontendTransport -PermissionGroups AnonymousUsers,ExchangeServers,ExchangeLegacyServers -MaxMessageSize 36MB -DomainSecureEnabled $True -ProtocolLoggingLevel Verbose -Server $server

	New-ReceiveConnector -Name "Outbound Proxy Frontend $server" -Bindings, [::]:717 -AuthMechanism Tls,Integrated,BasicAuth,BasicAuthRequireTLS,ExchangeServer -RemoteIPRanges $range -TransportRole FrontendTransport -PermissionGroups ExchangeServers -MaxMessageSize 36MB -DomainSecureEnabled $True -ProtocolLoggingLevel Verbose -Server $server

	New-ReceiveConnector -Name "Client Frontend $server" -Bindings, [::]:587 -AuthMechanism Tls,Integrated,BasicAuth,BasicAuthRequireTLS -RemoteIPRanges $range -TransportRole FrontendTransport -PermissionGroups ExchangeUsers -MaxMessageSize 35MB -MessageRateLimit 5 -MessageRateSource User -EnableAuthGSSAPI $True -Server $server

	New-ReceiveConnector -Name "Default $server" -Bindings [::]:2525, -AuthMechanism Tls,Integrated,BasicAuth,BasicAuthRequireTLS,ExchangeServer -RemoteIPRanges $range -TransportRole HubTransport -PermissionGroups ExchangeUsers,ExchangeServers,ExchangeLegacyServers -MaxMessageSize 35MB -MaxInboundConnectionPerSource Unlimited -MaxInboundConnectionPercentagePerSource 100 -MaxRecipientsPerMessage 5000 -SizeEnabled EnabledWithoutValue -Server $server