Reconnaissance and Enumeration

A tester wants to list the mail servers for client.example from the command line. Which command does this?

Show the answer

Correct answerC. dig client.example MX

AWhy not this: Requests A records, which give IP addresses, not mail exchangers.

BWhy not this: Returns registration data such as the registrar, not DNS mail records.

CWhy this is right: Queries DNS for the MX records, which name the domain's mail servers.

DWhy not this: Captures DNS packets on the interface but does not send a query itself.

The dig command with the MX record type queries DNS for the domain's mail exchangers. An A-record query is tempting but returns only IP addresses for the hostname, not its mail servers.