Load Balance Email with SpamTitan and DNS

Solution

To handle large volumes of email creates new challenges. This with the complication of downtime can be a major pain and causes system failures. As luck will have it this problem was recognized and resolved by SpamTitan and the great minds who designed DNS (Domain name resolution).

Here is a way you can set up your inbound and outbound email to not only handle large volumes of mail but also protect yourself against system failure.


Inbound Email

When using multiple mail servers, you would need to route inbound emails to both mail servers in a way that both mail servers process roughly the same amount of emails, thus load balancing the mail servers.

How to load balance with DNS:

  1. Define multiple MX records with the same priority
  2. Define multiple A records with the same name and different IP addresses
     

MX Preference entry Value

yourdomain.com MX 5 spamtitan1.yourdomain.com
yourdomain.com MX 5 spamtitan2.yourdomain.com

A Record entry

spamtitan1.yourdomain.com A 10.1.1.1
spamtitan2.yourdomain.com A 10.1.1.2

Multiple A records with the same name and different IP addresses

Record FQDN Record Type MX Preference Record Value

yourdomain.com MX 5 spamtitan.yourdomain.com


spamtitan.yourdomain.com A 10.1.1.1
spamtitan.yourdomain.com A 10.1.1.2

Outbound Email

Sending mail outbound we have 2 options, You could send to different mail servers in a round-robin (sending basically the same amount to each server, sharing the load) option or you could send in a Failover option (This will send email to the preferred server and if the server is not available, mail will be sent to the second or 3rd server in the list).

Specifies the destination mail server FQDN or IP for this domain. Typically the destination mail server would be the Microsoft Exchange Server or alternative mail server on your local network.

Multiple servers may be specified for failover or to specify that the listed servers should be used in round-robin fashion. The delimiter used controls this behavior:

  • Comma (‘,’): Each server in the list will be used in round-robin fashion.
  • Space (‘ ‘): The first entry will be regarded as the primary mail server. Subsequent entries will be treated as failover servers which will only be used it the preceding entry is unreachable.

For more information to setup your SpamTitan solution please feel free to contact us