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

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...
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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 and the mx record for your company points to your 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

this prevents a lot of regections in the first place.

a second entry with your dns host for 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.
jeffc1linAuthor Commented:
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.
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.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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
jeffc1linAuthor Commented:
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?
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 mask gatewayb mask 255255.255.255.gateway A
jeffc1linAuthor Commented:
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?
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.