two wans and only one for mail

Hi, I have two different wan-s and one lan on my MT. I would like to make that all traffic go trough one and only mail (tcp port 25) to go trough second one. I succeed to receive mail ( dst-nat) but how to make that outgoing mail use second wan. First wan is default gateway.
Thanks

Just mark routing the smtp tcp dst port 25 and then do a policy routing with this mark


Max
http://mikrotikexpert.com
http://maxid.com.ar

ok thanks but i need details. on Mangle what chain ? (preruting) Action ? Mark routing ok but passtrough yes or no? I could not make it work. Can you please link me to some tutorial about my problem or just write some settings details. Thanks

Hi scex ;
yes , first by mangle and prerouting mark the packet for smtp on port 25 passthrough yes .
then by prerouting mark the route for the traffic have packet mark you made before , passthrough no or yes i see it not matter with me .
in firewall Nat add a rule to masqurade the traffic have a route mark you did in mangle
in route add a rule to route the traffic have route mark to the wan you want .
try this and if you need further help write again .
here need to ask you how you determine the wan you receive the mail from ?
Max , what are the ports used by yahoo messenger ?
with best regards .

Thank. I will try tomorow to do this.

My site is not hosted local. I have only my mail server local. So on hosting server ( hostnine) with cpanel tools and mx records tools you can redirect mx anywhere. Now with some new Spam roules you will need to make one subdomain ( mail.mydomain.com) and make it with your publik ip A record in hosting provider DNS. now when somebody nslookup your ip it will be mydomain.com and it will not be stoped by some spam roules. Regards

Hi ;
while you are running your own mail server try to use this web site to block spammers ip .
http://www.projecthoneypot.org/

with best regards .