[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

Domain/DNS A record and MX record

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
Potts2002
Asked:
Potts2002
  • 4
  • 2
  • 2
1 Solution
 
Manoj BojewarCommented:
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
 
Potts2002Author Commented:
What happens when the mail A record and the mx records are different?
0
 
DrAtomicCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Manoj BojewarCommented:
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
 
DrAtomicCommented:
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
 
DrAtomicCommented:
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
 
Potts2002Author Commented:
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
 
DrAtomicCommented:
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now