finding MX record
Results 1 to 9 of 9

Thread: finding MX record

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    10

    finding MX record

    hi;

    How idenify which DNS server provides (has the) MX record entry for a particular mail server (mail.xxxx.com) using nslookup. kindly help me on this.

    Thank You

  2. #2
    Banned
    Join Date
    Apr 2003
    Posts
    298
    Contact you're ISP, they should tell you.

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    461
    um,

    man nslookup(if on nix).

    But really, go to nslookup interactive mode,

    promtp%> nslookup

    Then when inside nslookup interactive mode type

    set type=ns

    Then type in the domain name you are interested in.

    yahoo.com

    That should provide you with the name servers for yahoo.com all of them will have the mx record for yahoo.com.

  4. #4
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    I am not sure how to pull his of with NSlookup. It will show you a copyof the MX record, but not the dns server thats hosting it....try a samspade whois on the domain it will give you all of the DNS servers for the domin..


    [edit]
    Wow I hate when two people type at the same time. Thanks ICh.. you where correct, those of us on windows box's have horrable NSlookup help, it dosn't explain anything.
    [/edit]
    Who is more trustworthy then all of the gurus or Buddha’s?

  5. #5
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Go to nslookup interactive (just type 'nslookup')

    > server ns1.msstate.edu
    Default Server: ns1.msstate.edu
    Address: 130.18.80.12

    > set q=mx
    > msstate.edu
    Server: ns1.msstate.edu
    Address: 130.18.80.12

    msstate.edu preference = 10, mail exchanger = avsmtp01.msstate.edu
    msstate.edu preference = 20, mail exchanger = ra.msstate.edu

    Also interesting is to set q=a (query = any, then you get mx records, ns records, a records, etc)...


    As for the query itself, just send the domain, in your example, xxxx.com.

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  6. #6
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    interesting...note this will not work if the server you are on dosn't respond to a DNS request. I tried running this agenst my home server with server=my home server and dns timed out each time...I am sure this is due to security setup, as I have dns only talkng to the inside of the network. When I tried this with server set to another box (my work server ) it gave me all of the info.
    Who is more trustworthy then all of the gurus or Buddha’s?

  7. #7
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    When I posted that, I assumed that you would know to look at the whois record to determine the proper DNS server to query...You would have to have one, otherwise no mail And really, you don't have to select your own DNS or the DNS server of the domain that you want to query, any old DNS server on the internet that allows you to resolve from it will be able to get the MX record...

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  8. #8
    Senior Member
    Join Date
    Mar 2003
    Location
    central il
    Posts
    1,779
    I got that figured out...but if you run whois t oget the proper DNS server for the system you are interested in then you know where the MX record is hosted...makeing the use of nslookup to find the dns server for the mx record pointless (takeing all of this back to the origional question)...unless you have a DNS server handy that will let you do lookups through it.
    Who is more trustworthy then all of the gurus or Buddha’s?

  9. #9
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Well 2 things, 1) he said how do you do it with nslookup (so that is what I gave)
    2) whois might tell you the DNS servers for the domain, it won't tell you which mail server is preferred or any other detailed information, so it is usually worthwhile to check

    And wanted to point out something I said about using any dns server on the net to do this, keep in mind that DNS is a distributed database and that if a particular site is having DNS problems, makes frequent DNS changes, etc, your mileage may vary on using other servers aside from the ones that are authoritative for that zone (ie, if an ISP's DNS server is down, and another server cached response and the TTL hasn't expired, you might get a cached answer whereas the ISP's servers would refuse the connection....or lets say that the TTL hasn't expired, the ISP changes an record, then the server you are using has cached an old record and you get inconsistent results)...

    Ok, feel better about explaining that now...

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •