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 12.12.12.5 and a watchguard t35 (local 10.0.0.253) that manage 12.12.12.6, for failover purpose. they share the same isp router has the 12.12.12.0/28.
watchguard t35 - loc 10.0.0.254 - pub 12.12.12.5
watchguard t30 - loc 10.0.0.253 - pub 12.12.12.6
zone mycompany.com:
mycompany.com. MX 5 mail.mycompany.com
mycompany.com. MX 15 samemail.mycompany.com
mycompany.com. TXT "v=sfp1 a mx ip4:12.12.12.5 ip4:12.12.12.6 ~all"
mail.mycompany.com. A 12.12.12.5
samemail.mycompany.com A 12.12.12.6
zone 12.12.12.in-addr.apra:
5.12.12.12.in-addr.arpa. PTR mail.mycompany.com.
6.12.12.12.in-addr.arpa. PTR samemail.mycompany.com.
on firewall1: nat 12.12.12.5 - 10.0.0.1 commons mail ports
on firewall2: nat 12.12.12.6 - 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 (12.12.12.6) 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:
MAILSERVER NIC1
10.0.0.1
255.0.0.0
10.0.0.254
nic metric 2
NIC2
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 (12.12.12.5) 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 (12.12.12.6), not even port 25 and the other common ports will listen. I did a test, I launched a continuous query on port 25 on 12.12.12.5 and on 12.12.12.6, in the meantime of this test I turned off the firewall 10.0.0.254 (12.12.12.5), 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