Tip Verify if an email address is real HD

What I Found

You can verify many email addresses from Terminal by checking the domain's MX records, connecting to the mail server.

Sometimes you need to know whether an email address is real before you send something important. The usual answer is to send a test email and wait to see if it bounces, but that is not always reliable.

The practical way to check an email address from Terminal is to look up the domain's MX record, connect to one of the mail servers on port 25, start an SMTP handshake, and use the RCPT TO command with the address you want to test.

What this video covers

  • Why Not Just Send a Test Email?
  • Step 1: Find the MX Record
  • Step 2: Connect to the Mail Server
  • Step 3: Start the SMTP Handshake
  • Step 4: Check the Recipient

The short version

The practical way to check an email address from Terminal is to look up the domain's MX record, connect to one of the mail servers on port 25, start an SMTP handshake, and use the RCPT TO command with the address you want to test.

Links & Resources