Monday, September 18, 2006

Where Does My EMail Go?

You send an e-mail and you don't know which server will receive it? Find it out from the commad prompt...
Step 1. Take the domain of the destination e-mail box. For example account@someserver.com ==> "someserver.com".
Step 2. Open a Command Prompt window.
Step 3. Run nslookup utility.
Step 4. Type "set type=mx" (without the quotes). This will set the tool too look for Mal eXchange entries.
Step 5. Type in the domain you found on step 1.
Step 6. Read the list of possible receivers. Note that the one with lowest "MX Preference" will be used first. If this fails to receive mails, the second one will be tried and so on (in the ascending order of preference).
Example:
C:\>nslookup
Default Server: dns.provider.com
Address: 192.168.4.15

> set type=mx
> gmail.com
Server: dns.provider.com
Address: 192.168.4.15

Non-authoritative answer:
gmail.com MX preference = 50, mail exchanger = gsmtp163.google.com
gmail.com MX preference = 50, mail exchanger = gsmtp183.google.com
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 = 10, mail exchanger = alt2.gmail-smtp-in.l.google.com

gmail.com nameserver = ns2.google.com
gmail.com nameserver = ns3.google.com
gmail.com nameserver = ns4.google.com
gmail.com nameserver = ns1.google.com
>

Note that entries with the same preference value will be used in a random order. As you see "gmail-smtp-in.l.google.com" is the main (preferred) server for receiving the e-mails for GMail.

No comments: