|Load balancing with MX records|
It’s quite simple to set up a high performance load balanced mail cluster using MX records. You just need to define two MX records with the same priority. See this example to make it clear.
First, you need to have at least 2 working Proxmox Mail Gateways (mail1.example.com and mail2.example.com), each having its own IP address. Let us assume the following addresses (DNS address records):
mail1.example.com. 22879 IN A 126.96.36.199
mail2.example.com. 22879 IN A 188.8.131.52
Btw, it is always a good idea to add reverse lookup entries (PTR records) for those hosts. Many e-mail systems nowadays reject mails from hosts without valid PTR records.
Then you need to define your MX records:
example.com. 22879 IN MX 10 mail1.example.com.
example.com. 22879 IN MX 10 mail2.example.com.
This is all you need. You will receive mails on both hosts, more or less load-balanced using round-robin scheduling. If one host fails the other is used.