How to check the existing MX record? How do you know that email doesn't exist? How can I check that a domain is not sushestvuet?

I want to try to do the test from disposable emails. The question arose - how to programmatically do check MX records for a domain?

How do you know that email doesn't exist? (with reference to email is obvious. do not offer)
How do you know that domain does not exist most effectively? Well, that is not to wait a few minutes to answer, and immediately know the status.
March 19th 20 at 08:34
2 answers
March 19th 20 at 08:36
Solution
dig to check mx whois - check domain.
You can send mail from any mailbox, even non-existent, the question is, what normally configured mail server will reject that email because it will not pass an spf check, dkim and dmarc.
what is dig and what is whois. If the console command then I don't have it. if third-party services API, then write specifically what. - katarina_Will commented on March 19th 20 at 08:39
And no dig there. Ubuntu 16ю05 - katarina_Will commented on March 19th 20 at 08:42
@katarina_Will, Yes, it's console commands. They have in the Ubuntu package dnsutils, Google. Actually third-party services and API and use them to identify the different records and the existence of domains. With domains though slightly more complicated, not all zones are normally queried via whois.
If you need a third-party API that I'm aware of only about mxtoolbox.com but there is a paid API - Kaela39 commented on March 19th 20 at 08:45
The team host is still quite simple. bind9-host (Debian) and bind-utils (Centos)
host-t MX example.org - fatima commented on March 19th 20 at 08:48
normally configured mail server will reject this letter,

Right now straight. Slippers run and lose. My mail - I want to do. Want refused, want accept. Specially for such "odniczego". Accept and send to /dev/null - I have the right :) - brannon commented on March 19th 20 at 08:51
normally configured mail server will reject that email because it will not pass an spf check, dkim and dmarc

To do normally configured mail server will not pass an spf check, dkim, and dmarc if they contain incorrect values, but not if they are simply not available. - Tracey95 commented on March 19th 20 at 08:54
@Tracey95, Yes, and it is written - Kaela39 commented on March 19th 20 at 08:57
@brannon, well, Yes) what I want, and twirl, you can still mail a mother-in-law redirect such emails to do it :) - Kaela39 commented on March 19th 20 at 09:00
March 19th 20 at 08:38
How do you know that email doesn't exist?

No way. Postman is not obliged to comply with postal standards, it is recommended to do it. But due to the fact that such "checked" divorced, like cockroaches in the apartment drunk, very often, on assectella users (as well as dismissed, etc) - go to the special user. This may be a regular user box which is cleaned daily or /dev/null. Mailer letter received. And gave it to /dev/null. From Your point of view - the box is. But really - its not :)
Question read carefully. And comments clarifying. - katarina_Will commented on March 19th 20 at 08:41
@katarina_Will, need it? I have these questions here a dozen a day see wanting to "check out", "just test", "test course" :) for Sure - You will never know - read the e-mail user or a bot or /dev/null :) - brannon commented on March 19th 20 at 08:44

Find more questions by tags E-mailMail serverDomain name system