Command line tool to view MX record

L

Lakshman

Is there a command line tool to view what computer is
mapped as the MX record for a particular domain? Would the
dnscmd tool let me do that? Any help or pointers in the
right direction would be greatly appreciated.
Lakshman
 
J

Jeff Westhead [MSFT]

If you want to check what results a mail server would get you should
probably use nslookup.

nslookup -q=mx mydomain.com.

For more detailed output

nslookup -debug -q=mx mydomain.com.

Note trailing dots. Always dot-terminate names that you pass into nslookup
unless you want to test search list suffixes.
 
L

Lanwench [MVP - Exchange]

Yes, as Jeff wrote - but you might like to try www.dnsreport.com for
something easier on the eyes unless you're testing your own server's ability
to find the record.
 
A

Ace Fekay [MVP]

In
Lakshman in said:
Is there a command line tool to view what computer is
mapped as the MX record for a particular domain? Would the
dnscmd tool let me do that? Any help or pointers in the
right direction would be greatly appreciated.
Lakshman

I answered this in the windows.server.dns group.

Apparently this was mutliposted and NOT crossposted. Would have been to YOUR
benefit and OURS if you were to have crossposted this because responses from
all will show up in all the groups all at once and we don't double up on our
efforts.

Why and how to crosspost:
http://www.cs.tut.fi/~jkorpela/usenet/xpost.html

--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroup so all
can benefit. This posting is provided "AS-IS" with no warranties and
confers no rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 
J

John Coutts

Is there a command line tool to view what computer is
mapped as the MX record for a particular domain? Would the
dnscmd tool let me do that? Any help or pointers in the
right direction would be greatly appreciated.
Lakshman
*************** REPLY SEPARATER ***************
Nslookup will do the job, but try my DSN client program which is much easier to
use:

ftp://server2.yellowhead.com/utility/ClientDNS.exe

for the self installable version, and ClientDNS.zip for the zip version.

J.A. Coutts
 
A

Ace Fekay [MVP]

In
John Coutts in said:
*************** REPLY SEPARATER ***************
Nslookup will do the job, but try my DSN client program which is much
easier to use:

ftp://server2.yellowhead.com/utility/ClientDNS.exe

for the self installable version, and ClientDNS.zip for the zip
version.

I tried it but I got an "Error 10014 Encountered when sending data".



--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroup so all
can benefit. This posting is provided "AS-IS" with no warranties and
confers no rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 
J

John Coutts

I tried it but I got an "Error 10014 Encountered when sending data".
***************** REPLY SEPARATER *****************
Error 10014 is a general Winsock error that can occur for a number of different
reasons, but most often because of a bad socket address. The program uses the
Microsoft Winsock Control 6.0. The remote port is bound to port 53 UDP, and the
local port uses the first available port on the first interface that supports
TCP/IP (I have not tested the program on machines with more than 1 supporting
interface). The program attempts to discover the first default DNS server
available on your machine, and by default uses it as the remote host. You may
actually use any DNS server listed (or add your own) in either recursive or
non-recursive mode.

To narrow down the problem a bit, could you please supply a little more
information? Does the error occur when the program is loaded, or does it occur
when you attempt to send a query? Does it properly discover your default DNS,
which should appear in the DNS Server box?

If you don't care where the answer comes from, use it in the recursive mode
(default). But if want the answer directly from an authoratative server, use it
in the non-recursive mode. Click the "Root Servers" button and then choose one
of the Root Servers. When you query the root server, it will supply the GTLD
(or whatever) servers. Choosing one of these and re-applying the query will
generally provide the authoratative servers, but you may have to dig deeper.
Choosing one of these and re-applying the query will provide the authoratative
answer. By default, it looks for the "A" record, but once the authoratative
server is found, you can change the record type (say to MX) and requery.

You may contact me directly if you so desire.

J.A. Coutts
Systems Engineer
MantaNet/TravPro
<[email protected]>
 
A

Ace Fekay [MVP]

In
John Coutts in said:
***************** REPLY SEPARATER *****************
Error 10014 is a general Winsock error that can occur for a number of
different reasons, but most often because of a bad socket address.
The program uses the Microsoft Winsock Control 6.0. The remote port
is bound to port 53 UDP, and the local port uses the first available
port on the first interface that supports TCP/IP (I have not tested
the program on machines with more than 1 supporting interface). The
program attempts to discover the first default DNS server available
on your machine, and by default uses it as the remote host. You may
actually use any DNS server listed (or add your own) in either
recursive or non-recursive mode.

To narrow down the problem a bit, could you please supply a little
more information? Does the error occur when the program is loaded, or
does it occur when you attempt to send a query? Does it properly
discover your default DNS, which should appear in the DNS Server box?

If you don't care where the answer comes from, use it in the
recursive mode (default). But if want the answer directly from an
authoratative server, use it in the non-recursive mode. Click the
"Root Servers" button and then choose one of the Root Servers. When
you query the root server, it will supply the GTLD (or whatever)
servers. Choosing one of these and re-applying the query will
generally provide the authoratative servers, but you may have to dig
deeper. Choosing one of these and re-applying the query will provide
the authoratative answer. By default, it looks for the "A" record,
but once the authoratative server is found, you can change the record
type (say to MX) and requery.

You may contact me directly if you so desire.

J.A. Coutts
Systems Engineer
MantaNet/TravPro
<[email protected]>

ClientDNS picks up my two DNS servers separated by a comma:
4.2.2.2,68.80.0.6

So the way I see that ClientDNS works, it selects the two DNS servers that
my machine is configured with, but they show up in the list as I showed you
above with a comma separating them with NO spaces between the two. Kind of
didn't make sense why it would do that, so I thought maybe its supposed to
do that.

So assuming its using one of them (so I thought it would do, or assume it
should do), then I entered microsoft.com and hit "Send Query", and that is
when I received the error.

So following your suggestion to use a Root, that gave me a response. Hmm...

Taking it a step further, I tried another step by adding 4.2.2.2
individually (instead of the way the app "found" my two servers and
separated them with a comma) and tried the same query and it worked. I tried
it again adding the other DNS individually, selected that, hit Send Query,
and it worked as well..

But when I tried to choose what ClientDNS found originally, the two
separated by a comma, it did NOT work. Is this a bug?


--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroup so all
can benefit. This posting is provided "AS-IS" with no warranties and
confers no rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 
J

John Coutts

But when I tried to choose what ClientDNS found originally, the two
separated by a comma, it did NOT work. Is this a bug?
**************** REPLY SEPARATER *****************
It certainly sounds like a bug. The program has to dig the information out of
the registry, and unfortunately there are substantial differences in the way in
which the information is stored in the various Operating Systems. The comma
separation method was generally used in the older operating systems, with the
newer operating systems requiring an enumeration of all the interface registry
entries. It is possible that the methods were combined.

What OS and version are you using?

J.A. Coutts
 
J

John Coutts

**************** REPLY SEPARATER *****************
It certainly sounds like a bug. The program has to dig the information out of
the registry, and unfortunately there are substantial differences in the way in
which the information is stored in the various Operating Systems. The comma
separation method was generally used in the older operating systems, with the
newer operating systems requiring an enumeration of all the interface registry
entries. It is possible that the methods were combined.

What OS and version are you using?

J.A. Coutts
******************** SEPARATER **********************
Win 9x uses the comma separated method in a specific location, WinNT uses the
space separated method in a different location, and I have confirmed that XP
reverts back to the comma separated method in each interface (don't know about
2000 yet).

I have modified the code to use only the first DNS server, and updated the
install files. I have also made just the updated executive file available.

J.A. Coutts
 
A

Ace Fekay [MVP]

In
Win 9x uses the comma separated method in a specific location, WinNT
uses the space separated method in a different location, and I have
confirmed that XP reverts back to the comma separated method in each
interface (don't know about 2000 yet).

I have modified the code to use only the first DNS server, and
updated the install files. I have also made just the updated
executive file available.

J.A. Coutts

Thanks John for the update. Leave it to me to find the bugs! For some
reason, I usually do (maybe the way I fudge around with apps) LOL

btw - this is on Win2k Pro SP4. I tested it under XP Pro SP1 with the same
results.




--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroup so all
can benefit. This posting is provided "AS-IS" with no warranties and
confers no rights.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory

HAM AND EGGS: A day's work for a chicken; A lifetime commitment for a
pig. --
=================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top