1

when a user sends an email.. what is the procedures that is happening? i mean how the servers is distinguishing between @gmail.com and http://gmail.com for example? are there special configuration has to be done in the DNS server?

thank you.

1 Answer 1

11

There are special DNS entries called MX Records that mail servers or mail transfer agents use to determine where to deliver mail for a domain.

Using gmail.com as an example:

gmail.com       MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com       MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com
gmail.com       MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com       MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
gmail.com       MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com

The MX record preference determines the server which will be tried first in order of lowest number to highest. So in this case mail servers will attempt to deliver mail to gmail-smtp-in.l.google.com before trying alt1.gmail-smtp-in.l.google.com etc.

If MX preference numbers are the same then the mail servers should randomly distribute mail between them.

With respect to mail it self the protocol used is Simple Mail Transfer Protocol or SMTP.

Connecting to webservers via HTTP uses DNS A records (or sometimes CNAME that point to A records) instead:

gmail.com       internet address = 74.125.127.83
gmail.com       internet address = 209.85.225.83
gmail.com       internet address = 74.125.79.83
1
  • 2
    also note that in the absence of any MX records, the A records for the domain will be treated as an "MX 0" record.
    – Alnitak
    Nov 28, 2009 at 17:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .