[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can I route all email (smtp) traffic out a different gateway?

Posted on 2008-11-16
8
Medium Priority
?
1,868 Views
Last Modified: 2013-11-30
Currently we have sbs2003 connected to a network with 2 gateways (different isp's)

The purpose of this is to remove all email traffic away from the main gateway. Currently to do this I have created a smart connector to the second gateways smtp server and added a route to the second gateways smtp server to force it to go out through the second gateway.

This works ok however for some reason mail gets stuck in the smtp queue (isp rejecting certain messages or similar) and we need to flick over to dns to clear the queue and then go back to the smart connector.

Is there a way I can enable dns instead of the smart connector and force any smtp traffic to route out the second gateway??

Im fairly new to microsofts routing but I can add and remove persistent ip routes. Is it possible to add a route to a gateway by port??

Cheers for the info...
0
Comment
Question by:jeffc1lin
  • 3
  • 3
  • 2
8 Comments
 
LVL 3

Expert Comment

by:scriptaholic
ID: 22973152
ive had a lot of problems doing this myself as the receiving servers can block your mail send because the message went out from a different ip than it should have.

you may be sending from company.com and the mx record for your company points to your smtp.company.com and that resolves to your ip. but some isp's and destination servers now do reverse dns on your mail. so your own isp needs to have a reverse lookup setup to allow your ip address to be resolved back to smtp.yourcompany.com

this prevents a lot of regections in the first place.

a second entry with your dns host for yourcompany.com can add an scp record to allow your email to be sent from a second ip address (dont confuse this with a secondary mx record at a new level other than 10). this scp entry allows mail to be sent from an ip that is NOT your mail server (ie, your second gateway connection)

then, you should be able to do dns name based sending email and not use smart hosting at all.

this is the way i have it setup, and although it is not a direct answer to your question of directing mail through the second gateway i hope it helps with alternative train of thought.
0
 

Author Comment

by:jeffc1lin
ID: 22973357
Great information.. however I believe there is already reverse dns setup but not scp... this really wouldnt help tho because we dont want any traffic travelling through the other gateway anyways.

I guess my question is more or less what is the best way to configure the dns smtp server to send out through the non default gateway....??

It would surprise me if other sites around arent doing something similar. Does it require an isa server or similar? I believe bridgeheads come into play as well.
0
 
LVL 3

Expert Comment

by:scriptaholic
ID: 22973439
sorry i just noticed you were wanting to send ALL smtp traffic to the second gateway
if you want all mail traffic to go out the second gateway i would just setup smart host pointing to  your isp and then set a static route on your default gateway, to point the ip address of traffic destined to the smtp smart host to the second gateway.

so a smtp send from exchange would resolve in the normal way, but upon reaching the default gateway it would bounce to the second gateway and voila outbound email goes via the second connection for all email traffic.

note, the smart host you use needs to be the isp on the second gateway.This combined with incomming smtp traffic being directed to the ip address of your second gateway's external ip address by your mx record for your domain, would mean all smtp traffic goes through the second gateway.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
LVL 3

Expert Comment

by:georgestark
ID: 22975544
Script I dont think you read the original question correctly,  If the exchange server is only running exchange why not just use the gateway you want to send email through the default gateway.

hope this makes sense
0
 

Author Comment

by:jeffc1lin
ID: 22982135
george... The main gateway is for the network if I change that the dns will go up >>> creak! As the other machines will be on a different gateway to the server and portforwards would all drop.

So basically what everyone is saying is that you cannot create a route based on port? Seems strange to me would have thought you could...

I will have to look and see whether the primary gateway has the ability to route all traffic back to the second gateway... my issue is I dont want to use a smarthost as the isp's will drop every now and again (from original post) I would ideally like to use DNS to send mail. But enabling dns would mean that smtp traffic would head out the primary gateway.

So basically from script's idea i need to force my primary gateway to reroute smtp traffic to the second gateway... I believe its a shoddy home router like a netgear or something - Any body know at all how to do this on a server config level?
0
 
LVL 3

Expert Comment

by:georgestark
ID: 22982962
Jeff
let me see if i have got this right your default gateway handles all internet traffic call it gateway A, you want to continue to use gateway A for intenet traffic but route all exchange SMTP traffic via Gaeway B. If this is correct why dont you change the Exchange servers default gatway to Gateway B and add routes to the exchange server for any VPN/intenal traffic. i.e
0.0.0.0 mask 255.255.255.255 gatewayb
10.0.0.0 mask 255255.255.255.gateway A
0
 

Author Comment

by:jeffc1lin
ID: 22999631
george thats a good answer however that means I would need to add routes on all client machines?? Isn't that more effort than a task like this should really take? or do we set the route on Gateway A?
0
 
LVL 3

Accepted Solution

by:
georgestark earned 1500 total points
ID: 23002398
All client machines would use gatway A as usual, only change the deafault gateway on the exchange server.

You can use DHCP server to issue static routes to clients if you needed to.
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to effectively resolve the number one email related issue received by helpdesks.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question