How do I get ExchangeDefender to deliver inbound mail to multiple IP addresses?

ExchangeDefender
Comments Off on How do I get ExchangeDefender to deliver inbound mail to multiple IP addresses?

I was sitting around writing some documentation and felt compelled to share some general knowledge on how Internet mail is routed around. The basic problem / solution here is how do I get a multihomed Exchange environment on the cheap? Enjoy.

Please first consider the following document: ExchangeDefender Deployment Guide

ExchangeDefender can deliver inbound mail to a static IP address or perform an MX lookup and deliver to the first available server. We support secure TLS delivery to both IPv4 and IPv6 addresses.

If you have multiple static IP addresses that you wish to deliver inbound messages, ExchangeDefender can perform an MX lookup in order to deliver mail to one or more mail servers. Larger clients tend to have multiple Internet providers on multiple IP ranges and use them to provide failover service or load balancing. ExchangeDefender fully supports this configuration.

In order to get ExchangeDefender to deliver messages to either a failover or load balanced connection that has multiple external IP addresses you need to create another MX record in your domain and add the hostnames of the IP addresses to that MX list. Your default @ MX record for the domain will still point to inbound30.exchangedefender.com but ExchangeDefender will deliver to your new MX record. Here is an example:

# Primary / default MX record
@ in mx 10 inbound30.exchangedefender.com.

# Host records for individual mail servers
mail1     in a 65.99.192.2
mail2     in a 65.99.255.3

# MX record for direct load balanced / failover access
directmail  in mx 10 mail1.domain.com.
directmail  in mx 20 mail2.domain.com.

In the example above, your default / primary MX record for domain.com is inbound30.exchangedefender.com. You have defined a hostname on each IP range you own as mail1.domain.com and mail2.domain.com. Finally, you have created a new MX record directmail.domain.com that will resolve to mail1.domain.com and mail2.domain.com

Under this example external mail for user@domain.com would be sent to inbound30.exchangedefender.com. ExchangeDefender would then route the message according to the MX lookup for directmail.domain.com which goes to mail1.domain.com or if unavailable to mail2.domain.com. This is the failover configuration. If you set the weights on directmail MX record to 10/10 (or any other numbers, so long as they are equal) then ExchangeDefender would deliver mail in a round robin fashion allowing for load balancing.

This configuration is independent of router choice, because it does not require the router to fail over the link. You could just have multiple routers with multiple gateways on your network. This configuration will work with virtually all routers and load balancers on the market because it uses DNS to route mail, not a hardware switch.

Of course, to set the MX record to deliver mail to access your ExchangeDefender configuration and click Advanced Settings for Inbound mail.

Important Notes:

  • Make sure you check that the MX record exists, nslookup -q=mx directmail.exchangedefender.com should return two or more mail servers. If it returns invalid domain, something went wrong.
  • There is a difference between a host (A) record and a mail exchanger (MX) record – if you point ExchangeDefender at a host the message will bounce.
  • This is an advanced network topic and we strongly advise it be done by a competent IT Solution Provider, please contact us for a reference.