|Search the knowledgebase|
|Article ID : #||Last review : 2007-02-03 10:03:00|
How to use MX records
MX records are essential for the correct delivery of email.
What happens when a mail server wants to deliver mail to your domain? This is a several step process. Firstly the remote mail server will ask for the dns servers for your name. If they cannot be found for whatever reason, the mail will in most cases be permanently bounced immediately. This is why it is so important to have a reliable set of DNS servers on a different network to your own. If you DNS is up, but your mail server is down, mail will most likely still come through later even if the sender gets a few delay messages in the meantime. Without dns, all your mail bounces.
The next step is to ask for a list of the mail servers who handle mail for your domain. These are the MX records. These each contain the following information
Domain name we accept mail for | host name of the mail server | preference value
If we have no MX records, some mail servers will then try the host domain, but we consider it essential that you add MX records if you want to ensure reliable mail delivery for your domain.
If the dns server has returned a list of mx records such as the following
mtgsy.net | mail.mtgsy.net | 10
mtgsy.net | mail2.mtgsy.net | 20
Then mail.mtgsy.net is contacted first and the message is sent there. If no contact can be made with the mail.mtgsy.net, then mail2.mtgsy.net is tried, and so on. You can add as many MX records as you like in this manner. Note it is the lowest preference value that is used first.
What if you have a large amount of mail and want to load balance it between 2 or more servers? There are several ways to do this, but one is with MX records. On Microtech DNS servers, if you specify the same preference value for 2 or more MX servers then the connections should be more or less evenly distributed between the hosts.
Never point an MX record to an IP address. You must always create and A record for the host name and IP address and then point the MX record to the host name.
Never point an MX record to a CNAME. Whilst this might work for some mail servers it will just confuse them and it's not valid anyway. Don't do it!
Please note that all articles are the property of Microtech Limited and must not be re-produced without express written permission
Subscribe to kb news feed