How to get mail server ip address and cmd

Here are the steps to get the mail server IP address and use the nslookup command in Windows Command Prompt:

Method 1: Using the nslookup command

  1. Open the Command Prompt: Press the Windows key + R to open the Run dialog box, type cmd, and press Enter.
  2. Type the following command and press Enter: nslookup mx <domain_name> (replace <domain_name> with the domain name of the mail server you want to find).
  3. The output will show the mail server's IP address and other information.

Example: nslookup mx example.com

Output:

Server:  UnKnown
Address:  192.0.2.1

Non-authoritative answer:
Name:    mx.example.com
Address:  192.0.2.100

In this example, the mail server's IP address is 192.0.2.100.

Method 2: Using the dig command (Windows 10 and later)

  1. Open the Command Prompt: Press the Windows key + R to open the Run dialog box, type cmd, and press Enter.
  2. Type the following command and press Enter: dig mx <domain_name> (replace <domain_name> with the domain name of the mail server you want to find).
  3. The output will show the mail server's IP address and other information.

Example: dig mx example.com

Output:

; <<>> DiG 9.11.3-1.1ubuntu2.1-Ubuntu <<>> mx example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12345
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;mx.example.com.        IN  A

;; ANSWER SECTION:
mx.example.com.     3600    IN  A   192.0.2.100

;; Query time: 1 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Mar 17 14:30:00 UTC 2021
;; MSG SIZE  rcvd: 55

In this example, the mail server's IP address is 192.0.2.100.

Method 3: Using a DNS lookup tool

  1. Search for a DNS lookup tool online, such as WhatsMyDNS.net or DNSChecker.org.
  2. Enter the domain name of the mail server you want to find in the tool's search bar.
  3. Click the "Lookup" or "Check" button to perform the lookup.
  4. The tool will display the mail server's IP address and other information.

Remember to replace <domain_name> with the actual domain name of the mail server you want to find.