Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Domain/DNS A record and MX record

Posted on 2015-02-13
8
Medium Priority
?
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

 
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
 
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 2000 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

618 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