How to check mail server in command prompt

To check the mail server in Command Prompt, you can use the following commands:

  1. nslookup: This command is used to query the DNS (Domain Name System) for a specific domain or hostname. You can use it to check the mail server's DNS records.

Example:

nslookup <domain_name>

Replace <domain_name> with the domain name of the mail server you want to check (e.g., example.com).

  1. dig: This command is similar to nslookup, but it provides more detailed information about the DNS records.

Example:

dig <domain_name> MX

Replace <domain_name> with the domain name of the mail server you want to check (e.g., example.com). The MX option specifies that you want to retrieve the mail exchange records.

  1. telnet: This command allows you to connect to a mail server and test its functionality.

Example:

telnet <mail_server_ip> 25

Replace <mail_server_ip> with the IP address of the mail server you want to check (e.g., 192.0.2.1). The 25 specifies the port number for SMTP (Simple Mail Transfer Protocol).

  1. nslookup -type=mx: This command is used to retrieve the mail exchange records for a specific domain.

Example:

nslookup -type=mx <domain_name>

Replace <domain_name> with the domain name of the mail server you want to check (e.g., example.com).

  1. dig +short: This command is used to retrieve the mail exchange records for a specific domain and display the results in a concise format.

Example:

dig +short <domain_name> MX

Replace <domain_name> with the domain name of the mail server you want to check (e.g., example.com).

  1. mxtoolbox: This command is used to test the mail server's functionality and retrieve information about its DNS records.

Example:

mxtoolbox -mx <domain_name>

Replace <domain_name> with the domain name of the mail server you want to check (e.g., example.com).

Note: You may need to run these commands as an administrator or use the runas command to elevate your privileges. Additionally, some of these commands may require additional options or parameters to work correctly.