Nslookup mail server

nslookup is a command-line tool used to query DNS (Domain Name System) servers and obtain information about domain names and IP addresses. Here's an example of how to use nslookup to query a mail server:

Syntax:

nslookup <mail_server_name> [options]

Options:

Example:

nslookup -type=mx mail.example.com

This command will query the DNS server for the MX record of the mail server mail.example.com. The output will show the mail server's IP address and the priority of the MX record.

Output:

Server:         192.0.2.1
Address:        192.0.2.1#53

Non-authoritative answer:
mail.example.com    MX preference = 10, mail exchanger = mail.example.com

mail.example.com    MX preference = 20, mail exchanger = mail2.example.com

mail.example.com    MX preference = 30, mail exchanger = mail3.example.com

In this example, the output shows three MX records for the mail server mail.example.com. The first record has a preference of 10, the second record has a preference of 20, and the third record has a preference of 30. The mail server will use the MX record with the lowest preference to deliver emails.

Note: