user2002382
user2002382

Reputation: 111

How do you find the IP address of a specific mail server?

For example, how can I find the IP address of the mail server @yahoo.com or @hotmail.com?

Is there a way to do this on terminal?

Thank you.

EDIT: I meant to say IP address of the mail server dealing email addresses ending with @yahoo.com or @hotmail.com

Upvotes: 1

Views: 19060

Answers (2)

3lLobo
3lLobo

Reputation: 1

First find the mailserver (might be multiples):

dig yahoo.com mx

Then request the IPv4 record:

dig <yahoo-mx> a

In some cases you can find the IP inside the SPF record:

dig <yahoo-mx> txt

Upvotes: 0

Henry
Henry

Reputation: 337

nslookup is what you're after, or dig. Since you want a mail server you'll want to add the option '-type=mx' (Mail eXchange).

nslookup -type=mx gmail.com

Upvotes: 7

Related Questions