U
U
Uber Noob2019-02-13 15:29:33
Email
Uber Noob, 2019-02-13 15:29:33

Checking if there is mail on the domain?

If I was given mail on a domain as a mailbox, for example [email protected], is it possible to query DNS before sending a letter there and see if the domain has an MX record?
And if there is no MX record, then you can’t send a letter there, because. this is a 100% non-existent box, or at least not working now (it may have been once).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentin, 2019-02-13
@ubernoob

If PHP then you can check like this

getmxrr('site.com', $mx);
print_r($mx);

if (getmxrr('site.com', $mx)){
    // найдена у домена MX-запись
}

via nslookup
nslookup -type=mx site.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question