IT Learning | Server | MX Record
Everything might be not exactly correct in this article but it’s very useful for beginners to understand IT terms. If you want to learn IT but you don’t have any experience to work in the IT industry, I wish it helps you to understand IT and you like to study IT more.
Let’s start our 3 minutes lesson!
What is MX record?
- MX record is written in a zone file.
- MX record specifies a mail server responsible for accepting email messages.
- MX record is an abbreviation for Mail exchanger record.
I suggest you read the following articles before you read this article if you don’t know DNS well.
DNS: IT Learning | Network | DNS | Japan Teams
Secondary DNS: IT Learning | Server | Secondary DNS | Japan Teams
1. Authoritative name server uses MX record
MX record is a resource record in the Domain Name System (DNS). It’s written in a zone file.
There are two DNS servers. One is “Authoritative name server”. Another is called Caching DNS Server. Laptops usually ask Mr Caching DNS server the first question. If Mr Caching DNS server can’t answer the question, he will ask Ms Authoritative name server.
Authoritative name server: IT Learning | Server | Authoritative name server | Japan Teams
When Ms Authoritative receives the question from Mr Caching, she checks her job handbook called “Zone file”. There is much information in a zone file, and one of the information is “MX record”.
Zone file: IT Learning | Server | Zone file | Japan Teams
2. For what you need a MX record?
MX record is
the line written the mail server which mails are sent to.
For example, the chef sent an email to “orange.love@girl.com” which the orange girl uses.
At the first, that mail is delivered to the mail server which stores his mail temporary.
Then orange girl downloads his mail to her laptop from that server.
It’s a rough summary of how to exchange an email. MX records show you which email address(domain) should be sent to which mail server. In this example, the MX record indicates that “XXX@girl.com” should be sent to the server which stores “XXXX@girl.com” temporary.
3. How to write MX record?
How can you write an MX record in a zone file? Here is the format of the MX record in a zone file.
“Domain Name” IN MX “Priority” “Hostname of the Mail server”
“Domain name” is the target domain, which is the part of the mail address after @. MX after IN means that it is an MX record. “Priority” is very useful when you have multiple mail servers. If it’s used 10 and 20, 10 is the higher priority. For example,
- girl.com. IN MX 10 1-mail.girl.com.
- girl.com. IN MX 20 2-mail.girl.com.
1-mail.girl.com. is the higher priority than 2-mail.girl.com. in this sample. Thus, a small number has a high priority.
And “Hostname of the Mail server” is the name of the server which manages the mail of the target domain which you write as “Domain name”. Then the sample is as follows,
girl.com. IN MX 10 mail.girl.com.
More details are here: What is a DNS MX record? | Cloudflare, What is an MX record? – DreamHost Knowledge Base, MX record – Wikipedia
fin