Tip: Verify if an email address is real

Tip: Verify if an email address is real

If, for whatever reason, you may need to verify someone's email address. Yes, you could try The basic solution. Sending a test email and wait for a bounced back. However this is not very effective because of false positives due to catch all forwarding. Now there are many email verifying web service out their. But how do you know who to trust and which are just spam traps.

Why not keep it simple you already have the tools you need.

Validate an email address using SMTP over terminal

When you send an email to someone, the message goes to an SMTP server which then looks for the MX record (Mail Exchange) of the email recipient's domain.

Example:

  • Send an email to JohnSmith@gmail.com
  • The mail server will try to lookup an MX records for the gmail.com domain.
  • Determine whether email username (JohnSmith in our example) is present or not.

Verify an email address using similar logic with out having to wait for a bounce back.

Step 1. Open Terminal

Step 2. Use the following command to lookup the MX record of gmail.com

nslookup -type=mx gmail.com

Example of terminal output

office:~ thomasfraley$ nslookup -type=mx gmail.com Server: 192.168.70.1 Address: 192.168.70.1#53

Non-authoritative answer: gmail.com mail exchanger = 30 alt3.gmail-smtp-in.l.google.com. gmail.com mail exchanger = 20 alt2.gmail-smtp-in.l.google.com. gmail.com mail exchanger = 5 gmail-smtp-in.l.google.com. gmail.com mail exchanger = 40 alt4.gmail-smtp-in.l.google.com. gmail.com mail exchanger = 10 alt1.gmail-smtp-in.l.google.com.

Authoritative answers can be found from:

office:~ thomasfraley$

Step 3. Pick a smtp server in the list. Their maybe more then I personally go with the lowest level number but any will work.

Step 4. Next we are going initiate a handshake by saying hello using the telnet protocol. Type the following into in terminal

telnet alt1.gmail-smtp-in.l.google.com 25

Step 5. Respond with to the handshake with the following command.

HELO

Step 6. Identify yourself using the following. Does not have to real

mail from: 

Step 7. Type the recipient's email address that you are trying to verify. The server will respond to the "rcpt to" command with an OK if the address exists or an error if not.

rcpt to:

Terminal output:

rcpt to: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 ix6si17540970icb.57 - gsmtp
Thomas Fraley
I am a tech enthusiast whose main focus is making technology easy again for everyone. Educated with degrees in network engineering and project management. I've worked in the entertainment industry for a decade as a director of information technology for global companies pioneering the way. A few years ago I decided to give back and have been helping young entrepreneur startups off on the right foot.
www.lifewithtech.net
Previous
Previous

FirstLook: WayCharger

Next
Next

Headline: Government reached a deal with tech companies