I am getting internet from 2 different service providers, I have made a failover script. But i am now facing a new challenge. My emails (SMTP and POP3) ports are blocked by one ISP.
What I want to do is, make one ISP my primary (on port 1) which will cater internet traffic, but not SMTP and POP3, this will go via the secondary ISP.
But when the primary internet fails, the router should work as normal failover in this case it doesnt matter if emails works or not.
You will have to configure some special cases for that traffic into the balancing/failover mechanism that you created and did not describe.
Normally you will put in some mangle rules to mark the connections (outgoing TCP port 25, 119 etc) and then use those marks to route or block the traffic in the way you like.
failover between WANs are working fine. I did that in past with success. I know how to mark specific traffic/connection/packet via mangle, but only used that for QoS, what I dont know is how to force those to go out on a specific interface. requesting you to please provide guidance on that.