You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Serge Knystautas <se...@lokitech.com> on 2004/02/13 17:08:59 UTC

Re: email host name resolver

franck.yu wrote:
> My name is Franck and I am a java programmer. I get your name from 
> Apache James. I have got the following question:
>  
> When a SMTP server gets a recipient email address, how does it resolve 
> the host name? very often the SMTP server is not on the given host, it 
> is the case of hotmail.com, yahoo.com.... I am wondering SMTP server 
> must have a special way to resolve such host names then forward the 
> email to the right SMTP server. Would you please explain this to me? 
> Thanks in advance!

Franck,

Please send questions to the user mailing list.  This is a great 
question that others might find of interest.

The Internet uses DNS (domain name system, RFC 1034 and 1035) to covert 
host names to (and from) numeric IP addresses.

Most operations you do involve using "A" and "CNAME" DNS records.

- an "A" record maps a hostname to an IP address, e.g., www.apache.org 
-> 209.237.227.195
- a "CNAME" record maps one hostname to another hostname, e.g., 
issues.apache.org -> nagoya.betaversion.org (which has an A record to 
map that to a numeric address).

That's how most resolutions happen... ping, browsing, ftp, your email 
client, etc...

Server to server email resolution uses "MX" records.  The key difference 
between an MX record and a CNAME record is that it includes a number 
that is the priority of that server.  This priority tells an email 
server the order to attempt to deliver a message for that domain.

For example, yahoo.com maps to mx1.mail.yahoo.com with priority 1, 
mx2.mail.yahoo.com with priority 1, and mx4.mail.yahoo.com with priority 
5.  This means mail servers have to attempt to deliver a yahoo.com email 
to mx1 or mx2, and only if those fail try mx4.

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org