This article will review two methods to check the MX fields and SMTP server of a target domain, first manually to understand how this kind of procedure works, and then using a free tool. Checking SMTP and MX records is a particularly important part of validating and verifying emails.
There are several methods to check MX records of a domain.
Google provides a free service for obtaining domain records. Connect your web browser to https://dns.google.com and enter the domain name to be verified, "google.com" for example. You will also need to enter the letters MX in the RR field, and here is the result:
On any Unix based computer, such as Linux and Mac OS distributions, it is possible to use the dig utility to get the information about a domain from the command line. Here is how:
Whichever method you use, you now know which mail servers, otherwise known as SMTP, are used by the domain name to receive emails.
Once you have the names of the SMTP servers of the recipient's domain, you should check that its service is working.
The common way to do this is to use the telnet utility and connect to the SMTP port to check that the server responds. The SMTP port number is generally 25, and here is how to proceed:
We received a response from the SMTP server and can deduct for sure that it's up and running.
Note that depending on the server configuration, it is possible that the server is not listening on port 25 but ports 465, 587, or 2525.
Even if these manual methods allow you to obtain results in a few minutes, it is inconceivable to proceed this way when you have a multitude of email addresses to be checked.
It is then necessary to use a service capable of providing this information automatically and quickly.
Abstract provides an API that allows you to check MX records and SMTP servers from an email address for free. Besides, the analysis data that the Abstract API provides contains a lot of additional information about the recipient's email address and its configuration.
Register on the Abstract site with your email address and your chosen password, which does not require a credit card. You are ready to use the API with a simple GET call. Here is an example of use with curl from the command line:
The Domain Name System, commonly known as DNS, is mainly used to match a domain name with an IP address. This is how most Internet users can easily access their favorite websites. But DNS records are not simply limited to websites' IP resolution. They actually provide a whole configuration about a domain name.Among these configurations are MX records, which is an abbreviation of mail exchange. MX records are used to indicate to which mail server to connect to reach the mailboxes hosted on a domain. So an SMTP server needing to send an email will first examine the MX fields of the destination domain to find out which mail server to address next.