I need help for a mail server configuration. I would like to know if it's possible to have multiple MX with different pub IP, pointing to the same local server. this is because in my environment exist 2 gateway (multiple services providers), a watchguard t30 (local 10.0.0.254) that manage 18.104.22.168 and a watchguard t35 (local 10.0.0.253) that manage 22.214.171.124, for failover purpose. they share the same isp router has the 126.96.36.199/28.
watchguard t35 - loc 10.0.0.254 - pub 188.8.131.52
watchguard t30 - loc 10.0.0.253 - pub 184.108.40.206
mycompany.com. MX 5 mail.mycompany.com mycompany.com. MX 15 samemail.mycompany.com mycompany.com. TXT "v=sfp1 a mx ip4:220.127.116.11 ip4:18.104.22.168 ~all" mail.mycompany.com. A 22.214.171.124 samemail.mycompany.com A 126.96.36.199
188.8.131.52.in-addr.arpa. PTR mail.mycompany.com. 184.108.40.206.in-addr.arpa. PTR samemail.mycompany.com.
on firewall1: nat 220.127.116.11 - 10.0.0.1 commons mail ports
on firewall2: nat 18.104.22.168 - 10.0.0.1 commons mail ports
MAILSERVER nic config
ip: 10.0.0.1 subnet mask: 255.0.0.0 gw 10.0.0.254 metric 2 gw 10.0.0.253 metric 50
In this way when the first gateway goes down, all the request start comes (and goes out) from 10.0.0.253 (22.214.171.124) on common ports (25..443..) instead of the gateway with metric 2.
or maybe I could assign another NIC to the mail server and change all rules on firewalls, and then works with INTERFACE metrics, like in the example:
10.0.0.1 255.0.0.0 10.0.0.254 nic metric 2
10.0.0.2 255.0.0.0 10.0.0.253 nic metric 50
I would like to know if there is any contraindication in using this method, or if there are alternatives.. other infos, the mailserver is Mdaemon. every help is appreciable!
edit: If I use the configuration with two gateways and different metrics, my server will always use the one with the lowest metric 10.0.0.254 (126.96.36.199) until it finds it online. Unless I set some particular route, the server will not be able to use the secondary 10.0.0.253 (188.8.131.52), not even port 25 and the other common ports will listen. I did a test, I launched a continuous query on port 25 on 184.108.40.206 and on 220.127.116.11, in the meantime of this test I turned off the firewall 10.0.0.254 (18.104.22.168), the server has therefore stopped listening on it, and began to listen on the secondary firewall in metric. are there scenarios where my server could start communication not using the 10.0.0.254 when it is online? test fw1 down