Trouble shoot domain name issue using nslookup
nslookup is a computer program used in Windows and Unix to query Domain Name System (DNS) servers to find DNS details, including IP addresses of a particular computer, MX records for a domain and the NS servers of a domain. The name nslookup means “name server lookup”.
nslookup is also use as a command-line administrative tool for testing and troubleshooting DNS servers. In the very simple usage, if you enter a domain name, you get back the IP address to which it corresponds, and if you enter an IP number, then you get back the domain name to which it corresponds.
There are two modes available in nslookup: interactive and non-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non-interactive mode is used to print just the name and requested information for a host or domain. Following is an example in using interactive mode of nslookup.
C:\>nslookup
Default Server: dns3.maxonline.com.sg
Address: 202.156.1.58> ifreetuition.com
Server: dns3.maxonline.com.sg
Address: 202.156.1.58Non-authoritative answer:
Name: ifreetuition.com
Address: 74.220.215.82
You may also use nslookup to find out the mail server for a particular domain. In this case we will need the MX record. For example:
C:\>nslookup
Default Server: dns3.maxonline.com.sg
Address: 202.156.1.58> set type=MX
> asiatcm.com.
Server: dns3.maxonline.com.sg
Address: 202.156.1.58Non-authoritative answer:
asiatcm.com MX preference = 0, mail exchanger = aspmx.l.google.comasiatcm.com nameserver = ns1.hostmonster.com
asiatcm.com nameserver = ns2.hostmonster.com
aspmx.l.google.com internet address = 209.85.143.27
In this example, it shows that the MX record for asiatcm.com is 209.85.143.27. In another words, an email towards asiatcm.com should be forwarded to email gateway with the IP address of 209.85.143.27. As you can see, the MX record is rather important. Suppose however that your domain was having trouble receiving E-mail and you suspected that a DNS server issue was to blame. You could use nslookup to confirm that the domain does indeed have an MX record and that the MX record is pointed to the correct IP address.
interesting! set type=MX and set q=MX; is it the same? Can we check whether that email address exist or not? by using telnet?
same, result are the same whether it is set type=MX and set q=MX.
You may telnet to port 25 of the email server. Some server will check the email address for the recipient to see if it is exist or not like the following:
—
c:\telnet mx.domain.com 25
…
RCPT TO:
450 Service unavailable
RCPT TO:
250 Ok
quit
221 Closing connection. Good bye.
—
In this case, apparently user2 is exist, however, user1 is not.
Hope help Joon Chong. Are you in network industry now?
I found out that some email server able to connect by telnet to port 25 and 587. How do we determine which port they using?
Thanks for your help. I got it.
220 sgperak.mschosting.com
helo xxxxxxxxx
250 sgperak.mschosting.com Hello [115.132.2.248]
mail from:xxx@domain.com
250 OK Sender ok
rcpt to:xxxxxxx@domain.com
550 Authentication is required for relay
rcpt to:xxx@domain.com
250 OK Recipient ok
*550 Authentication is required for relay [what possible this error message could be?]
haha. Still remember me huh? (happy) YES, in network industry now.
The easiest way - use network port scanner software - a lot are available on the internet ^^
The error message shows that the email server has implemented policy such that it will not allow other people to use it as an email relay server - a waste of resource from their organization view of point.