title: Resolving gmail.com mail server
body: <p>I am trying to find the gmail.com mail server using dig command and verifying the results returned by dig command using telnet.</p>
  
  <pre><code>$ dig gmail.com MX
  
  ; &lt;&lt;&gt;&gt; DiG 9.7.3 &lt;&lt;&gt;&gt; gmail.com MX
  ;; global options: +cmd
  ;; Got answer:
  ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 54145
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0
  
  ;; QUESTION SECTION:
  ;gmail.com.         IN  MX
  
  ;; ANSWER SECTION:
  gmail.com.      800 IN  MX  10 alt1.gmail-smtp-in.l.google.com.
  gmail.com.      800 IN  MX  20 alt2.gmail-smtp-in.l.google.com.
  gmail.com.      800 IN  MX  30 alt3.gmail-smtp-in.l.google.com.
  gmail.com.      800 IN  MX  40 alt4.gmail-smtp-in.l.google.com.
  gmail.com.      800 IN  MX  5 gmail-smtp-in.l.google.com.
  
  ;; Query time: 14 msec
  ;; SERVER: 192.168.1.1#53(192.168.1.1)
  ;; WHEN: Tue Dec 27 02:09:50 2011
  ;; MSG SIZE  rcvd: 150
  </code></pre>
  
  <p>Dig command says "alt1.gmail-smtp-in.l.google.com" is one of the mail server. The smtp ports 25 or 587 is not opened(verified using telnet) for the link "alt1.gmail-smtp-in.1.google.com". However the link <a href="http://support.google.com/mail/bin/answer.py?hl=en&amp;answer=13287">http://support.google.com/mail/bin/answer.py?hl=en&amp;answer=13287</a> says that smtp.gmail.com is the mail server for gmail.com and the port 587 opens for it. Why dig is giving wrong email servers or where my understanding in reading dig output is going wrong.</p>