Examples of using multiple MX records
You can use a single Internet domain with a single domain name or single Internet domain name with two balanced servers when using multiple mail exchanger records (MX records).
- Using a single Internet domain with a single domain name
- Using a single Internet domain name with two balanced servers
Using a single Internet domain with a single domain name
You can specify MX records for a single Internet domain -- for example, renovations.com -- with a single Internet domain name, such as renovations.com. Use the server's fully-qualified Internet host name in the MX and A records -- for example, mail1.renovations.com.
For example, configure a backup SMTP server (mail2.renovations.com) to deliver or forward mail when the primary SMTP server (mail1.renovations.com) is unavailable:
- MX record: renovations.com IN MX 5 mail1.renovations.com
A record: mail1.renovations.com IN A 192.168.10.17
- MX record: renovations.com IN MX 10 mail2.renovations.com
A record: mail2.renovations.com IN A 192.168.10.18
Messages addressed to renovations.com route to mail1.renovations.com first because the record's preference (5) is not as high. If mail1.renovations.com is unavailable, mail is routed to mail2.renovations.com.
Using a single Internet domain name with two balanced servers
If you specify equal preference for two servers, DNS randomly selects a server to balance the load of incoming mail.
- MX record: renovations.com IN MX 5 mail1.renovations.com
A record: mail1.renovations.com IN A 192.168.10.17
- MX record: renovations.com IN MX 5 mail2.renovations.com
A record: mail2.renovations.com IN A 192.168.10.18
Using a single Internet domain with multiple domain names
You can create MX records for a single Internet domain -- for example, renovations.com -- with multiple Internet domain names -- for example, renovations.com, qrs.com, and xyz.com.
- MX record: renovations.com IN MX 5 mail1.renovations.com
- MX record: renovations.com IN MX 10 mail2.renovations.com
- MX record: qrs.com IN MX 5 mail1.renovations.com
- MX record: qrs.com IN MX 10 mail2.renovations.com
- MX record: xyz.com IN MX 5 mail1.renovations.com
- MX record: xyz.com IN MX 10 mail2.renovations.com