How to use Exchange 2003 to route email to different Smart Hosts depending on the senders primary default email address domain

I have two Exchange 2003 SP2 Servers that house 3 different domains. Let's call the exchange servers SMTP1 and SMTP2.

The 3 domains used are: abc.com, xyz.com, and 123.org

Currently, SMTP1 and SMTP2 only have the "Default SMTP Virtual Server" installed and a "SMTP Connector" installed with the "address space" of * and cost of 1.

We are adding two SMARTHOST SMTP servers for the purposes of securing outbound emails. Let's call them SMARTHOST1 and SMARTHOST2.

We want to achieve 3 different results:

Result 1)
On SMTP1 we want to do the following:
We want to route all SMTP traffic that is initiated by a user on SMTP1 with the email address domain of 'abc.com' to go to SMARTHOST1 for processing.
and
We want to route all SMTP traffic that is initiated by users on SMTP1 with the email address domains of 'xyz.com' and '123.org' to go to SMARTHOST2 for processing.

Result 2)
On SMTP2 we want to do the following:
We want to route all SMTP traffic that is initiated by a user on SMTP2 with the email address domain of 'abc.com' to go to SMARTHOST1 for processing.
and
We want to route all SMTP traffic that is initiated by users on SMTP2 with the email address domains of 'xyz.com' and '123.org' to go to SMARTHOST2 for processing.

Result 3)
On SMTP1 we want to do the following:
We want to use SMTP1 as a SMARTHOST to relay email blasts from a single internal computer out to the internet using DNS.

Is this possible? Your help is greatly appreciated.
LISIITAsked:
Who is Participating?
 
Vishal BreedProgram ManagerCommented:
Result 1 and 2 can be achived with use of SMTP connector.

What I have observed is,
1> you want to route outgoing emails of abc.com email address (from SMTP1 and 2) to go to  SMARTHOST1.
2> to route outgoing emails of xyz.com and 123.org (from SMTP 1 and 2) to go to SMARTHOST2.

Requirement - Create 3 query-based DL for adding users automatically of abc.com, xyz.com and 123.org as per their email address. Means 3 query based DLs for abc.com, xyz.com and 123.org.

Result 1
- Create SMTP Connector 1 - give name - route to SMARTHOST1.
- Select Smarthost delivery option and mention the SMARTHOST1 DNS name in given box or mention the IP address of SMARTHOST1 in [1.1.1.1] such brackets.
- in local bridgeheads, add SMTP virtual servers of SMTP1 as well as SMTP2.
- in address space tab - add SMTP *
- in delivery restrictions tab - keep the selection in Accepted.
- Add Query-Based DL of abc.com

Result 2
- Create SMTP Connector 2 - give name - route to SMARTHOST2.
- Select Smarthost delivery option and mention the SMARTHOST1 DNS name in given box or mention the IP address of SMARTHOST1 in [2.2.2.2] such brackets.
- in local bridgeheads, add SMTP virtual servers of SMTP1 as well as SMTP2.
- in address space tab - add SMTP *
- in delivery restrictions tab - keep the selection in Accepted.
- Add Query-Based DL of xyz.com and 123.org

For Result 3, looks like you are using a application to send email and want to realy them via SMTP1 to go out with DNS lookup - it's possible - but please ensure, sender email address is not abc.com, xyz.com and 123.org.

Result 3
- In properties of SMTP virtual server of SMTP1 - access tab - relay button - add the IP address of computer which will relay.
- Create SMTP Connector 3 - give name - Application Relay.
- Select DNS lookup delivery option
- in local bridgeheads, add SMTP virtual servers of SMTP1 only.
- in address space tab - add SMTP *

Good to go!!!!
0
 
Vishal BreedProgram ManagerCommented:
0
 
LISIITAuthor Commented:
What a great idea..!! Using "Query based distribution groups" for the Accepted/Rejected selections within the Delivery Restriction Tabs on each of the SMTP Connectors is brillant. This configuration is the closest I have come to getting this to work but I'm still not able to route the traffic as described above.

One thing I failed to mention during my initial submission is that SMTP1 and SMTP2 Exchange servers are in different locations on different networks so... SMTP1 and SMTP2 can't be 'local' bridgeheads as you describe above and I'm wondering if this might be my problem.

The only way that I have been able to control routing traffic between the two SMTP connectors is to cost the address space cost of one or the other. When I set the cost to 1 on both and try the above Accept settings all email flows out of the first routing connector that I created (this happens everytime). I have tried every concievable combination of Accepted and Denied dist groups but the traffic continues to always go out the first SMTP connector. Again, the only way I have been able to get the mail to flow out the other SMTP connector is to change the cost of the first SMTP connector to 2. The connectors act like they are not really looking at the senders email domain route but instead are only looking at the cost settings.

I have tested each of my "Query based distribution groups" and they populate with the correct email domains without issue so I know they are working correctly. Man... I'm so close I can taste it but have run out of ideas to try. Can you think of anything each I could be missing?

Thanks again for all of your help. :O)

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
Vishal BreedProgram ManagerCommented:
Better you create additinal routing group (as Second Routing Group) and move SMTP 2 in that.

-- First Administrative Group
---- SMTP1
---- SMTP2

-- First Routing Group
--- SMTP1

-- Second Routing Group
--- SMTP2

Now Create Routing Group connector between First Routing Group and Second Routing Group. This will take care of internal email routing.

Result 1
- Create SMTP Connector in First Routing Group - give name - ABC.COM to SMARTHOST1.
- Select Smarthost delivery option and mention the SMARTHOST1 DNS name in given box or mention the IP address of SMARTHOST1 in [1.1.1.1] such brackets.
- in local bridgeheads, add SMTP virtual server of SMTP1.
- in address space tab - add SMTP *
- in delivery restrictions tab - keep the selection in Accepted.
- Add Query-Based DL of abc.com
- Routing Group connector should forward all emails from abc.com of SMTP2 to SMTP1.
- If not, create SMTP Connector in Second Routing Group - give name - ABC.COM of SMTP2 to SMARTHOST1 via SMTP1
- Select Smarthost delivery option and mention the SMTP1 DNS name in given box.
- in local bridgeheads, add SMTP virtual server of SMTP2.
- in address space tab - add SMTP *
- in delivery restrictions tab - keep the selection in Accepted.
- Add Query-Based DL of abc.com

Result 2
- Create SMTP Connector in Second Routing Group - give name - XYZ.COM and 123.ORG to SMARTHOST2.
- Select Smarthost delivery option and mention the SMARTHOST2 DNS name in given box or mention the IP address of SMARTHOST1 in [2.2.2.2] such brackets.
- in local bridgeheads, add SMTP virtual server of SMTP2.
- in address space tab - add SMTP *
- in delivery restrictions tab - keep the selection in Accepted.
- Add Query-Based DL of xyz.com and 123.org
- Routing Group connector should forward all emails from xyz.com and 123.org of SMTP1 to SMTP2.
- If not, create SMTP Connector in First Routing Group - give name - XYZ.COM and 123.ORG to SMARTHOST2 via SMTP2
- Select Smarthost delivery option and mention the SMTP2 DNS name in given box.
- in local bridgeheads, add SMTP virtual server of SMTP1.
- in address space tab - add SMTP *
- in delivery restrictions tab - keep the selection in Accepted.
- Add Query-Based DL of xyz.com and 123.org
0
 
Vishal BreedProgram ManagerCommented:
Once you finish configuring these settings, restart SMTP and Routing Group Connector Services. Allow AD replication to happen!! Surely, you will see achive the targets.
0
 
LISIITAuthor Commented:

Vishal,

As it turns out, your first solution actual worked, I did tweak a couple settings just to make the routing more precise but it did work. The root cause of my routing problems wasn't the fact that the two SMTP servers were in different locations and on differnet netwroks. The actual problem was the fact that the 'Restricted Delivery' settings weren't affecting any routing behavior.

I found this article and it fixed this issue:
- XCON: Connector Delivery Restrictions May Not Work Correctly
http://support.microsoft.com/kb/277872
I added the following key into the registry of both Exchange 2003 servers (i.e. SMTP1 and SMTP2):
HKLM\SYSTEM\CurrentControlSet\Services\RESvc\Parameters\CheckConnectorRestrictions to 1 (DWORD) and restarted Routing Engine SVC and SMTP SVC to enable restriction checking on local machine.
Once I added this registry entry, the 'Restricted Delivery' settings came to life and they began to work as documented. Amazing..!!

My final setup looks like this:
Result 1 (Done on SMTP1)
- Create SMTP Connector 1 - gave name - route to SMARTHOST1.
- Select Smarthost delivery option and gave it SMARTHOST1 IP Address of [1.1.1.1].
- in local bridgeheads, add SMTP virtual servers of SMTP1.
- in address space tab - add SMTP * cost = 1
- in delivery restrictions tab - set to deny all except Query-Based DL of abc.com

- Create SMTP Connector 2 - give name - route to SMARTHOST2.
- Select Smarthost delivery option and gave it SMARTHOST2 IP Address of [2.2.2.2].
- in local bridgeheads, add SMTP virtual servers of SMTP1.
- in address space tab - add SMTP * cost = 1
- in delivery restrictions tab - set to deny all except Query-Based DL of xyz.com and 123.org

Result 2 (Done on SMTP2)
- Create SMTP Connector 1 - gave name - route to SMARTHOST1.
- Select Smarthost delivery option and gave it SMARTHOST1 IP Address of [1.1.1.1].
- in local bridgeheads, add SMTP virtual servers of SMTP2.
- in address space tab - add SMTP * cost = 1
- in delivery restrictions tab - set to deny all except Query-Based DL of abc.com

- Create SMTP Connector 2 - give name - route to SMARTHOST2.
- Select Smarthost delivery option and gave it SMARTHOST2 IP Address of [2.2.2.2].
- in local bridgeheads, add SMTP virtual servers of SMTP2.
- in address space tab - add SMTP * cost = 1
- in delivery restrictions tab - set to deny all except Query-Based DL of xyz.com and 123.org

Thanks for all of your great advice, funny... MS Tech Support said it couldn't be done. Doh
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.