Domain/DNS A record and MX record

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, when mail is sent it sees in the mx record and then mail is forwarded to that address.
if a "mail" A record is added to the domain name of this takes priority over the mx record so when mail is sent it first goes to where it is then forwarded to the from the mx record.

Is this correct? essentially the 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!!
Who is Participating?
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.
Manoj BojewarCommented:
This is wrong. Mail flow only work with  MX record Priority not A record. 1st MX record priority 10 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
Potts2002Author Commented:
What happens when the mail A record and the mx records are different?
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

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: A record A record MX 10

Will cause the mail to be delivered at the server. A record A record MX 10

Will cause the mail to be delivered at the server.

Bottomline, A records are like street addresses, MX records are just saying which street addresses have postboxes.
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.
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.
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.
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?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.