Solved

Domain/DNS A record and MX record

Posted on 2015-02-13
8
158 Views
Last Modified: 2015-02-13
Hi
Seeking a little clarification please.

When configuring a domain name/DNS, mx records can be setup. E-mails to that domain name are then sent to the mx record. e.g mx1 record 99.99.99.99, when mail is sent it sees 99.99.99.99 in the mx record and then mail is forwarded to that address.
if a "mail" A record is added to the domain name of 100.100.100.100 this takes priority over the mx record so when mail is sent it first goes to 100.100.100.100 where it is then forwarded to the 99.99.99.99 from the mx record.

Is this correct? essentially the mail.domain.com is first address the mail will be sent to and the mx is used once it has arrived?

This would also mean that the mail a record and the mx record can be on different hosts/ip addresses.

Many thanks for your help.

Hope this makes sense!!
0
Comment
Question by:Potts2002
  • 4
  • 2
  • 2
8 Comments
 
LVL 4

Expert Comment

by:Manoj Bojewar
ID: 40607478
This is wrong. Mail flow only work with  MX record Priority not A record.

ABC.com 1st MX record  10.10.10.1 priority 10
ABC.com 2nd MX record 10.10.10. 2 priority 20

Example, if you have two MX record pointed with two different priority then high Priority records will take care of mail flow, in case first record is down then it will go through second MX record.



Always mail flow through
0
 

Author Comment

by:Potts2002
ID: 40607484
What happens when the mail A record and the mx records are different?
0
 
LVL 7

Expert Comment

by:DrAtomic
ID: 40607493
MX records define the mail serving addresses for a domain, a MX record needs an A record to define the mailserver.

There is no such thing as a mail A record, the MX record uses an A record for it's address, if that A record is wrong then the mail will not be delivered to that address as it tries to do so at the wrongly defined address.

For example:

mailserver.domain.com A record 10.99.99.99
website.domain.com A record 10.100.100.100
domain.com MX 10 website.domain.com

Will cause the mail to be delivered at the website.domain.com server.

mailserver.domain.com A record 10.99.99.99
website.domain.com A record 10.100.100.100
domain.com MX 10 mailserver.domain.com

Will cause the mail to be delivered at the mailserver.domain.com server.

Bottomline, A records are like street addresses, MX records are just saying which street addresses have postboxes.
0
 
LVL 4

Expert Comment

by:Manoj Bojewar
ID: 40607496
FYI.. You can point MX record either to IP address or A record.  if your MX record is pointed to A record. in case if you change the A record, MX record will also get updated A record IP.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 7

Expert Comment

by:DrAtomic
ID: 40607497
Do not ever point a MX record to an ip address directly, whilst it is possible it is against the RFC and will cause erratic behaviour.
0
 
LVL 7

Expert Comment

by:DrAtomic
ID: 40607506
Also, your MX record is not getting updated when you change the A record, the A record is getting updated. Back to the street example, if you change the A record your are basically changing the street address nothing changes with the fact that you own a postbox, the location of the postbox is changed not the fact that you do own a postbox.
0
 

Author Comment

by:Potts2002
ID: 40607517
Thanks DrAtomic.

So if I understand this correctly if a mail is sent it uses the mail A record first, in your analagy the mail goes to the street and then checks with the mx records to find out where the mailbox is.

If this is correct, can e-mails be filtered at the mail. point of the process prior to being delivered to the final mx record destination?

Thanks
0
 
LVL 7

Accepted Solution

by:
DrAtomic earned 500 total points
ID: 40607573
Sending mail is a different story, when delivering mail the following happens:

1. Sending mailserver looks up the nameserver (dns server) that serves the domain.
2. Then the sending mailserver looks up to see if a postbox exists for the domain and to which A record that is linked.
2b. If multiple MX records exist the MX record with the lowest route cost is used (priority figure, i.e. prio 20 is more expensive then prio 10 so the A record of prio 10 is used).

To add a filter layer you can use smart host where you configure the highest cost MX as a backup mailserver for the lower cost MX, then block the incoming public traffic to the lower cost MX so that mailservers are always forced to use the higher cost MX.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now