Friday, July 20, 2007

Can you Run a Mail server without MX record




Answer is: YES
is it recommended to Run a mail server without MX record: Answer is no, make sure you have MX record on your PUBLIC DNS Servers.
Do I need MX record internally (Active Directory DNS integration) Answer is: NO There is no need to configure MX Records for internal use, simply because internal e-mail and replication traffic is usually controlled via Active Directory. Here is some clarification for you and all of us t is possible for email to be delivered internally, within your Exchange Organization, without the need for MX records. In your case it works fine, you don't need one, ( INTERNALLY, mean within your mail organization)

The  reason  Internal Exchange servers will resolve all delivers request by looking at, and locating  A (host) records in Internal DNS. Host Records (A Record) IP address is map to a Computer name, every computer registered into DNS will have A record ,Things will Change on out the Internet ( this is outside your internal network)
MX Record , Mail Exchanger record, it specified the Mail server for Authoritative Domain, simply tells who the mail server is for a Domain.
Default priority is Priority=10
Now , when  an Exchange server  outside your company  want to  send your company e-mails
Sender Exchange servers will ask  ( look for )  auhorative  DNS servers for your domain name ( Zone),
Usually request  will go to ISP DNS servers, and ISP DNS server will have an Entry within their Public DNS zone
When ISP DNS server receives the request from let's say    your Exchange server , is asking
Do you know the IP address of
oz@smtp25.org  )  SMTp25.org   mail server, I would like to send some e-mails to this domain.
ISP DNS server will say

No problem let me look it up ( now ISP DNS server will do a look up on his Database, in order to determine the IP address of  SMTP25.org Mail server)
First think ISP DNS servers will perform  lookup for an MX Record ( This is the difference, internally  this would be A (Host record) Lookup)
When ISP DNS server finds the MX record for requested name space it hands off to the requester
Now if multiple records are found , DNS server hands off all the records to a Requester
Requester Mail Server, accepts the results ( list of MX records) , and  Requester mail server MTA, or server, decided which one to establish session FIRST
Assuming  public DNS handed off   4 records  to you about SMTP25.org with same MX  weight (Priority)

MX (10)    SMTP25.org

 

192.168.1.100

MX (10)    SMTP25.org

 

192.168.1.101

MX (10)    SMTP25.org

 

192.168.1.102

MX (10)    SMTP25.org

 

192.168.1.103


 

Now your Exchange server ( mail server ) will try to establish SMTP connection to all records up here
Before, your Mail server  queuing the mail 
IF there is no MX record exists, on ISP DNS servers, Bases on RFC 2821
http://tools.ietf.org/html/rfc2821

ISP DNS server will perform  a second Query if there is no MX record found, which will be an A record of the SMTP25.org Domain
 
 
 
Additionally :
When an e-mail message is sent through the Internet, the sending
mail transfer agent makes a DNS query requesting the MX record for the recipient's domain name, which is the portion of the e-mail address following the "@". This query returns a list of host names of mail exchange servers accepting incoming mail for that domain, together with a preference number. The sending agent then attempts to establish an SMTP connection to one of these servers, starting with the one with the smallest preference number, delivering the message to the first server with which a connection can be made. If no MX records were present, a second request is made for the A record of the domain instead.
 
 
 
 
 
Conclusion:
There is no need to configure MX Records for internal use, simply because internal e-mail and replication traffic is usually controlled via Active Directory.
MX Record is recommended on Public DNS servers, to speed up the DNS query , since based on RFC  2821, External query will do a lookup for MX records FIRST
 
Cheers
Oz

2 comments:

Dean T. Uemura said...

Nice article OZ... MX records seems to be one of those topics that gives Exchange admins difficulty. The messaging world needs more information about TCP/IP, routing, and DNS.

Keep up the great work!

Oz Casey, Dedeal said...

Thanks Dean, nice to have you here

Best
oz