This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Uplink balancing and smtp

Good Morning,

I have a question to the following scenario:

My ASG has two uplink interfaces and uplink balancing is active, a multipath rule is defined to force all outgoing smtp traffic on the first WAN-interface WAN1. It exists a mx-record and rdns-entry for the ip-address / hostname of WAN1. The second WAN-interface should send and receive mails in case of failover (e.g. WAN1 is offline). I think that I should expand my mx-record and define a rdns-entry for WAN2:

WAN1
====
IP: 1.2.3.4
DNS: mail.xyz.com
RDNS: 1.2.3.4 -> mail.xyz.com
MX-Record: xyz.com -> mail.xyz.com (with higher priority, e.g. 10)

WAN2
====
IP: 6.7.8.9
DNS: mail2.xyz.com
RDNS: 6.7.8.9 -> mail2.xyz.com
MX-Record: xyz.com -> mail2.xyz.com (with lower priority, e.g. 50)

In that case both interfaces can send outgoing mails and receive incoming mails, is that correct? The only problem is the configuration of SMTP hostname where I only can define one hostname. I think some mail server check if the smtp hostname (helo) belongs to the ip-address, in this case that wouldn't work.

Another idea is to use the same rdns-entry for the second WAN-interface:

WAN2
====
IP: 6.7.8.9
DNS: mail2.xyz.com
RDNS: 6.7.8.9 -> mail.xyz.com
MX-Record: no change needed

In that case the smtp hostname (helo) belongs to the ip-address but the resolution of the smtp hostname return the ip-address of WAN1. If I add an additional ip-address to mail.xyz.com external mailserver would use an ip-address for our mailserver with round robin. That's not what I want.

Has someone an idea?

Thanks and kind regards
Christian


This thread was automatically locked due to age.
  • This was wrong - see Post #5 below

    Hi, Christian, I think you have the solution using both ideas.

    Two issues: sending and receiving.  For sending, your second idea works: rDNS is the hostname of your Astaro for both IPs.  For receiving, your first idea works: a second MX record with a higher number.

    Isn't that right?


    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Update your SPF record to reflect both IP addresses as well as doing the RDNS. Also, you will be getting mail on your second interface if you add it to your MX record. I have found that it doesn't matter how it's weighted, if your primary interface lags even a small amount, some mail servers will fail over to the secondary MX entry immediately. In the old days, spammers would send to the secondary as well as the primary simultaneously. I don't know if this is still a common practice with spammers. If this doesn't matter, add the second address to your MX record with a weighting of 90. If you would rather not receive mail on the secondary address, don't add it to your MX.  Change the TTL to 30 minutes. That way, if your primary does down, you can update your MX record with the secondary address and you won't be down more than an hour, but your SPF will already be correct.
    I'm doing this already on one of my systems.
    Make any sense?
  • Good Morning,

    we don't have a SPF record, so we have nothing to change in regard to this. Bob said, that I should use my hostname mail.xyz.com for both RDNS, this means:

    WAN1
     ====
     IP: 1.2.3.4
     DNS: mail.xyz.com
     RDNS: 1.2.3.4 -> mail.xyz.com
     MX-Record: xyz.com -> mail.xyz.com (with higher priority, e.g. 10)
     
    WAN2
     ====
     IP: 6.7.8.9
     DNS: mail2.xyz.com
     RDNS: 6.7.8.9 -> mail.xyz.com
     MX-Record: xyz.com -> mail2.xyz.com (with lower priority, e.g. 50)

    Isn't it a problem, that rDNS of WAN2 is not the same as dns of WAN2? Will this be checked by any mail systems? 

    kwyrick, it doesn't matter to receive mails on the second interface, although it could be possible that spam will be received on both interfaces. Is there a special reason for the weight of 90? Is there are difference if I define 50 or 90?

    Thanks!

    Kind regards
    Christian
  • You're right, Christian.  I'd forgotten that the comparison was IP->FQDN->IP and not IP->FQDN->Hostname.  In fact, the newer RFC requires the acceptance of any syntactically-correct domain name used in a HELO command.

    Your first suggestion in Post #1 looks 100% right for your requirements.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA