Newbie Question : EMail servers and MX records

David Botham dns at botham.net
Mon Jan 13 17:38:29 UTC 2003




> -----Original Message-----
> From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org] On
> Behalf Of Julien Matthieu
> Sent: Friday, January 10, 2003 6:41 PM
> To: comp-protocols-dns-bind at isc.org
> Subject: Re: Newbie Question : EMail servers and MX records
> 
> 
> i will try to answer you ...
> 
> 
> paul williams wrote:
> > Hi,
> >
> > I'm not too hot on DNS and that kind of thing. My understanding is
> > that DNS is a globally connected list which allows host names to map
> > to IP addresses.
> >
> > How does this work for mail servers using MX entries in the DNS ?
> >
> > For instance, we've got a small email server here which processes
our
> > email for xyz at treysta.net. I understand that theres a DNS entry for
> > mail.treysta.net somewhere which points to our mail server.
> >
> > So, if someone, say xyz at abc.com sends a mail to me at treysta.net, how
> > does it all work. Does it search the DNS for an MX entry for
> > treysta.net and then direct it to our mail servers IP address ?
> exactly
> 
> >
> > Whys it called mail.treysta.net ? Or could it be
anything.treysta.net
> > just needs to be an MX entry ?
> just need to be an mx record

It is also important to remember that the name appearing on the Right
side of an MX record must appear on the Left side of an A record and NOT
a CNAME record:

treysta.net.	MX 10	mail.treysta.net.

;OK
mail.treysta.net.	A	192.168.1.1

;NOT OK!
mail.treysta.net.	CNAME	www.treysta.net.


Many people that run both a mail server and web server on the same
system will use a CNAME for "mail.theredomain.com" instead of simply
creating another A record.  Also, as Julien pointed out, your MX record
could simply use the existing A record for, in my example, your web
server:

treysta.net.	MX 10	www.treysta.net.
www.treysta.net.	A	192.168.1.1


Mail servers do not care what the name of your mail server is... they
only care that it is both listening on port 25 and that it is in fact
configured to handle mail for the name specified on the Left side of the
MX record.

Dave...


> 
> >
> > What happens if email sent is unable to connect to the IP address
> > pointed at mail.treysta.net ? Does email get bounced ?
> >
> no, most if not all mail transport agent (servers) have timers to
> re-try sending the email for a couple of days... so if it can't reach
> the mail server
> after x times for let's say 2 days .... it comes back to the sender
> saying the mail server couldn't been reach...
> 
> 
> finaly: i'll give you an example of this without the mail in
mail.host.org
> 
> if you have any question ask ....
> 
> 
> ; <<>> DiG 8.3 <<>> microsoft.com mx
> ;; res options: init recurs defnam dnsrch
> ;; got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL:
6
> ;; QUERY SECTION:
> ;;      microsoft.com, type = MX, class = IN
> 
> ;; ANSWER SECTION:
> microsoft.com.          2H IN MX        10 maila.microsoft.com.
> microsoft.com.          2H IN MX        10 mailb.microsoft.com.
> microsoft.com.          2H IN MX        10 mailc.microsoft.com.
> 
> ;; ADDITIONAL SECTION:
> maila.microsoft.com.    2H IN A         131.107.3.124
> maila.microsoft.com.    2H IN A         131.107.3.125
> mailb.microsoft.com.    2H IN A         131.107.3.123
> mailb.microsoft.com.    2H IN A         131.107.3.122
> mailc.microsoft.com.    2H IN A         131.107.3.126
> mailc.microsoft.com.    2H IN A         131.107.3.121
> 
> ;; Total query time: 86 msec
> ;; FROM: sype.org to SERVER: default -- 192.168.1.100
> ;; WHEN: Fri Jan 10 18:37:51 2003
> ;; MSG SIZE  sent: 31  rcvd: 193



More information about the bind-users mailing list