Mail Exchanger record is the record tells other DNS servers who the authoritative mail server is for the requested SMTP name space.
If my SMTP name space is “@smtp25.org” I typically expected to have or would have below records in the public DNS servers for senders to be able to send my mail servers e-mails.
MX (Mail exchanger record) tells other DNS servers, who is the authoritative mail server for the requested SMTP mail domain.
A record specifies the FQDN for the server, FQDN pointing to unique IP address, Let’s say I am going to e-mail you, here what happens in a simple way.
I use my outlook to send mail to you, I insert your mail address as destination, you@yourDomain.com, My exchange server takes the message, contacts to its configured DNS server.(normal internal AD/DNS integrated DNS)
AD/DNS server , sees the requested domain is YourDomain.com and uses it’s configured forwarders to perform recursive query, and ask the question ( generally works this way) , who is responsible mail server for SMTP domain YourDomain.com?
The configured Forwarder on the internal DNS servers, normally are ISP DNS server and they do the heavy lifting and they go out the internet and ask the same question to other DNS name servers.
I need to know the IP address of the mail server for the domain YourDomain.com, who has this information? Assuming there is least one DNS server who claims to be authoritative for your SMTP domain and the mail server record so the DNS server do know where to pass the SMTP traffic too, (YourDomain.com) says
***Hey I am the authoritative mail server for requested SMTP name space and here is my IP address*** and provides the IP address to the requested ISP DNS server.
*** DNS query wont fail if there is no MX records, MX record in reality is not needed for mail delivery, the DNS servers do search in this order, Look MX record first, Look A record second, Look Cname record third***
The part become tricky is, some mail gateways or DNS servers will fail the query and be mean if there is no MX record for the destination mail server, meaning it is up to sender to talk to strangers or not.
When ISP DNS server finds the IP address for intended SMTP server if passes the IP address back to AD/DNS server, AD/DNS server passes it to exchange server and exchange server established SMTP connection on port 25
I hope this helps to understand the basic mail flow
Oz Casey Dedeal
MCITP (EMA), MCITP (SA)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +