When a backup MX server is setup, it’s needed to configure the destination server for the domain being backed up.
For example:
domain.tld. 172800 IN MX 10 mail.domain.tld. domain.tld. 172800 IN MX 20 backup.domain.tld.
In our mailertable we have:
domain.tld esmtp:[mail.domain.tld]
Simple, isn’t it? We’re using the brackets to avoid MX resolution, and hence undesirable loops because we’re in the MX records ourselves (backup.domain.tld).
But, What if the master server has two 10 MX records to load balancing? We can’t remove the brackets because of a possible loop… Sendmail has two solutions (although not very well documented).
Simulate MX Failover
Setup different servers separated with :, for example:
domain.tld esmtp:[mail1.domain.tld]:[mail2.domain.tld]
When mail1.domain.tld fails, mail2.domain.tld is used.
Simulate DNS Round-Robin
Setup different servers separated with ,, for example:
domain.tld esmtp:[mail1.domain.tld],[mail2.domain.tld]
The mail submittion will be balanced between the provided servers.
Final Rant
It would be great if mailertable documentation was more complete. Sometimes is very difficult to find this kind of information, because the mailing lists aren’t as easy to find with Google as used to.
