MX Records: What
are they, and how do I use them?
"MX" (Mail
eXchanger) Records identify the mail server or servers responsible
for handling mail for your domain name, and allow you to use
a server other than your web server for email. If we didn't
use an MX-Record, mail would have to be addressed to "bob@mail.myserver.org",
or something equally cryptic. When you send an email to "bob@myserver.org",
your mail server looks up the MX-Record for "myserver.org"
to find out which server actually handles mail for "myserver.org"
(this could be "mail.myserver.org" or someone else's
mail server, such as "mail.yahoo.com"). Once the
mail server finds out the server's name, it looks for an A-Record
for that server's name to determine the proper IP address,
then sends the email to the email server on that IP address.
An MX-Record MUST
contain the NAME of an email server, not the IP address. This
means that you must have an A-Record defined for that server,
or email servers may not be able to find your server's IP
address. (You're right, this doesn't seem to make sense, but
this is the way that DNS MX-Records work.) Also, you don't
want to point an MX-Record to a CNAME-Record, since many email
servers will not handle this well. It is better to add an
additional A-Record pointing to the server that handles your
email. One other note: Don't use wildcards ("*"
in a domain name) unless you are POSITIVE you know what you
are doing. In most cases, they will cause unexpected results
[RFC 1912 2.7].
You can have more
than one MX-Record associated with each domain, normally one
for each email server (primary, secondary, tertiary, etc.).
If the primary mail server is down, sending mail servers will
attempt to access the secondary, then tertiary, etc. Under
normal conditions, the Primary mail server receives all mail,
and the backup mail servers (secondary, tertiary, etc.) only
receive mail if there are problems. In the event of a problem,
these servers are set to accept mail and forward it to the
primary server when it is back online.
Some of you may ask:
"How do I forward mail for my domain to another mail
server, such as the one at my Internet Service Provider using
MX-Records?" Unfortunately, MX-Records do not provide
any easy way to do this. This is because an email server has
to know which domains to accept email for. Unless you have
an ISP that is willing to configure it's email server to recognize
your domain, your mail will probably bounce if sent to their
email server. With that being said, you CAN run your own email
server and configure it to forward or resend mail for your
domain to another mail server. The problem with this scenario
is bandwidth, since each email message must be received and
then resent.
To find
out how to create MX-Records, click
here
For more information or to post questions or comments about
the use of our products please visit our Online Support
Forum.