Jump to Navigation

293 - MX records

MX stands for Mail Exchange Records. MX records are used in DNS records(or Zone files) to specify how email should be routed.

You can check the following command to look at MX information.

[root@localhost]# nslookup
> set q=mx
> google.com

1. Multiple mail servers

Multiple email servers are useful for the sake of redundancy. If the Highest Priority email server (one with the lowest Preference number) is down,
then the email is routed to the Server with the second highest Preference number.

For example :

mydomain.com. 14400 IN A 216.34.94.184
server2.mydomain.com. 14400 IN A 216.34.94.185
mydomain.com. 14400 IN MX 0 mydomain.com.
mydomain.com. 14400 IN MX 30 server2.mydomain.com.

You can have unlimited MX entries for Fallback.

2. Pointing MX records to an IP

Its not possible to have an MX record pointing directly to an IP. For example 'mydomain.com. 14400 IN MX 0 216.34.94.184`` is wrong.
Define an ``A Record'' first and then have the MX record pointing to it.

server2.mydomain.com. 14400 IN A 216.34.94.185
mydomain.com. 14400 IN MX 30 server2.mydomain.com.

3. MX records for Subdomains

A Subdomain is something like this ``Subdomain.mydomain.com''. Assume you want to send an email to webadmin@subdomain.mydomain.com
and to capture that on another server.

mydomain.com. 14400 IN A 216.34.94.184
server2.mydomain.com. 14400 IN A 216.34.94.185
mydomain.com. 14400 IN MX 30 mydomain.com.
subdomain.mydomain.com. 14400 IN MX 30 server2.mydomain.com.

In this configuration, webadmin@subdomain.mydomain.com would go to 216.34.94.185 and liz@mydomain.com would go to 216.34.94.184.

 



Main menu 2

Story | by Dr. Radut