Enable Sender Based Routing in Exchange Server 2007/2010/2013/2016/2019 - Tutorial

If you have multiple domains in your Exchange Server 2007/2010/2013/2016/2019 and need some or all of them to route through a different Send Connector, you will need to enable SBR (Sender Based Routing) in your Exchange Server.

Sender Based Routing is not supported in Exchange 2007/2010/2013/2016/2019 natively, so a custom SBR Transport agent must be configured.

This tutorial gives you a quick overview of how to set up and enable "Sender Based Routing or Transport Rule Based Routing" in Exchange Server 2007/2010/2013/2016/2019.

Sender Based Routing in Exchange Server

Exchange Server doesn’t support “Sender Based Routing” natively, but you can use an Exchange Server plugin to enable this function.

How it works:

  • Install "EA Sender Based Routing" on Exchange Server.
  • Create a customized Send Connector on Exchange Server.
  • Create a Routing Rule in Sender Based Routing Manager.

“Sender Based Routing Agent” checks if current email message matches the routing rule based on Sender, Sender Group, Recipient, Headers or Subject conditions:

  • If current email message does not match the rule, skip it, the default Send Connector will handle this email message.
  • If current email message matches the rule, it will re-route the email to Send Connector specified in the rule.
how sender based routing for exchange server works

Sender Based Routing Plugin Installation

You can download EA Sender Based Routing for Exchange Server Installer and install it on your server.

Double click the installer file and the installation will be executed automatically. The installer requires Exchange Server 2007 SP1/2010/2013/2016/2019 to be installed. If no Exchange Server is detected in your operating system, Setup will be aborted.

After the installation is completed, click “Sender Based Routing Manager” from Windows Start menu -> All Programs -> “EA Sender Based Routing” to begin the setup.

Note

Installation Permission

An account with Administrative Privileges is required to run the installer for installing “Send Based Routing” on Exchange Server.

Important

After the installation is complete, I strongly suggest that you check “Microsoft Exchange Transport Service” and “Microsoft Exchange Mail Submission Service” in Control Panel -> Administrative Tools -> Services, and check if those services are running, if not, start them manually.

Create a New Send Connector

For example, if you want to relay all emails from domain “mysenderdomain.com” using a specified Send Connector, you would create a new Send Connector from the Exchange Admin Center (https://yourserver/ecp) -> mail flow -> Send Connectors, and name it as mysenderdomain.com.sbr.

create new send connector in Exchange Server

Note

In Exchange 2007/2010, you should use Exchange Management Console -> Organization Configuration -> Hub Transport -> Send Connectors to create a new Send Connector.

  • Then select Next, select "MX record associated with recipient domain" or "Route mail through smart hosts" based on your environment. If you selected "Route mail through smart hosts", add your smart host to the hosts list.

    send connector networking settings smart host in Exchange Server

Send Connector Network Settings

Important

For Exchange Server is 2007 - 2013, you must use a smart host (Route mail through smart hosts) in this Send Connector, otherwise, your email will get SMTPSEND.DNS.NonExistentDomain error.

For Exchange 2013 SP1 - 2019, you can use either “Route mail through smart hosts” or “MX record associated with recipient domain”.

  • Then select Next, if you selected "Route mail through smart hosts", set user authentication for your smart host based on your smart host requirement, default is none.

    If you selected "MX record associated with recipient domain", this step is skipped.

    set smart host authentication for send connector in Exchange Server
  • Then select Next, click the plus sign (+), and add mysenderdomain.com.sbr into address space, you need to input this address space into "Sender Based Routing Rule" at next section.

    set address space for send connector in Exchange Server
  • Click Next, add your source servers and then Finish.

    select source server for send connector in Exchange Server

After the above Send Connector is created, we can create a routing rule to use this Send Connector.

Create a Sender Based Routing Rule

Now we need to create a rule in "Sender Based Routing Manager" to re-route the email to the Send Connector created in previous section.

Here is how “Sender Based Routing Rule” works:

sender based routing work flow in Exchange Server

Open “Sender Based Routing Manager” from Windows Start menu -> All Programs -> “EA Sender Based Routing

  • Click Routing Rules -> New;
  • Input a meaningful description for this rule;
  • Select "if the sender address matches the following pattern";
  • Input *@mysenderdomain.com in Sender Address, sender address supports wildcard (* and ?);
  • Input mysenderdomain.com.sbr in Address Space, this is the address space you have added in your Send Connector.
create sender based routing rule in Exchange Server

Finally, click Save, after this rule is created, all emails from *@mysenderdomain.com will be relayed by “mysenderdomain.com.sbr” Send Connector.

You can enable Full Debug Log in Sender Based Routing Manager -> Journal, then send a test email from *@mysenderdomain.com, and check the log content to see if the rule works as expected.

Advanced Options in Sender Based Routing Rule

Besides Sender Condition, you can also add more conditions such as Header, Sender Group, Recipient and Subject. The email message will be re-routed to specified Send Connector while the rule matches all conditions.

advanced options of sender based routing in Exchange Server

Exchange Transport Rule Based Routing and Header Conditions

If you would create more complex conditions that "Sender Based Routing Manager" doesn’t support, you can combine Exchange built-in Transport Rule and Header Condition like this:

Open Exchange Admin Center (https://yourserver/ecp) -> mail flow -> rules

Note

In Exchange 2007/2010, you should use Exchange Management Console -> Organization Configuration -> Hub Transport -> Transport Rules to create a new Transport Rule.

  • Click plus sign and create a new rule;
  • Click "more options";
  • Click "add conditions", add the conditions you want;
  • In this rule, “subject or body text includes ‘reroute’ word” is added as a test condition;
  • Then click "add action" -> "Modify the message properties" -> "Set the message header to this value"
  • Header name is set to "X-Reroute-Message", value is set to "yes"
  • Save this transport rule.
Create new transport rule in Exchange Server

Then create a rule in "Sender Based Routing Manager" like this:

  • Click Routing Rules -> New;
  • Input a meaningful description for this rule;
  • Select "if the sender address matches the following pattern";
  • Input *@mysenderdomain.com in Sender Address, sender address supports wildcard (* and ?);
  • Select “and the email contains one of the following headers”;
  • Add X-Reroute-Message: yes to Headers List;
  • Input mysenderdomain.com.sbr in Address Space, this is the address space you have added in your Send Connector.
Transport Rule works with Header Conditions in Exchange Server

Combining with above Transport Rule and Header Conditions, the emails from *@mysenderdomain.com with subject or body text including “reroute” will be re-routed to “mysenderdomain.com.sbr” Send Connector.

Sender Based Routing Plugin Troubleshooting

If Sender Based Routing is not working properly, you can enable full debug log like this:

Full Debug Log

  • Go to Sender Based Routing Manager -> Journal -> change Log Level to Full Debug.
  • Send a test email which matches the rule.
  • You can find log file in Journal shortly, check log content and see if the email was re-routed to the specified Send Connector.
  • Change log level back to “Only Error” to reduce the log file size.

Verify Sender Based Routing Agent Installation

If there is no debug log generated after you enabled full debug log, you should verify the installation of EA Sender Based Routing Agent like this:

Open Exchange Management Shell and input:

Get-TransportAgent

press enter

You will see "EA Sender Based Routing Agent" in the output.

sender based routing transport agent in Exchange Server 2007/2010/2013/2016/2019

If there is no "EA Sender Based Routing Agent" in the output, you can try to re-run the installer directly to fix this issue, or contact our technical support team for assistance.

Free Email Support

Not enough? Please contact our technical support team.

Support@EmailArchitect.NET

Remarks

We usually reply emails within 24hours. The reason for getting no response is likely that your SMTP server bounced our reply. In this case, please try to use another email address to contact us. Your Gmail, Hotmail or Office 365 email account is recommended.