How to Ping Email Address?

Foreword

This article gets into the technical details of how to ping email address or ping email addresses. Its target audience assumes an elementary level of computer and networking knowledge.

The tools described in this article are readily available in Microsoft Windows. Equivalents are accessible in most other operating systems.

Introduction

For people who know the basics of computer networking, PING  is an indispensable tool for diagnosing connection issues.

“Email pinging” works in a very similar way to a standard network “ping” in that there’s a starting machine (e.g., your desktop or servers) and an ending machine (e.g., the mail servers) but that’s where the similarities end. Pinging e-mail boxes is different from regular network pinging in almost every way other than two computers are having a conversation.

Advantages of Email Box Pinging

  • In several cases, it is possible to work out if an e-mail address is valid or not.

Disadvantages of Pinging Email Address

  • In some cases, it will not be effective at conclusively determining is a mailbox exists or not.
  • It is challenging to do from a technical perspective.

High-Level Description of the Ping Process

Before we get into an example of how this is done, let’s first describe at a high level the steps required. It will be helpful to utilize an example e-mail address to help step us through the stages. Let’s use the e-mail address below:

not.a.valid.emailaddress.12345qa@gmail.com

This will be our example e-mail address used throughout the rest of this article.

Step 1 – Get Detail of Mail Server

Get the name of the mail server responsible for e-mail address “not.a.valid.emailaddress.12345qa@gmail.com”.

Using a service called DNS, we can easily work out that the mail servers hosting the example e-mail address return the following as list of servers:

  • gmail-smtp-in.l.google.com
  • alt1.gmail-smtp-in.l.google.com
  • alt2.gmail-smtp-in.l.google.com
  • alt3.gmail-smtp-in.l.google.com
  • alt4.gmail-smtp-in.l.google.com

For this example, we’ll use the very first server in the list that is “gmail-smtp-in.l.google.com.”

Step 2 – Connect To The E-mail Server

Using a console tool on our server or desktop, we can “connect” to the mail server “gmail-smtp-in.l.google.com.”

Step 3 – Having “Chat” With Mail Server

Once we’re connected to a mail server, there is a protocol or set sequence of commands that we can use to converse with a mail server. We’ll go into details on the exact commands later in this article.s

Step 4 – From “Chat,” determine if the e-mail address is valid or not

From the recorded sequence of responses and commands in step 3 above, we can efficiently work out if an e-mail address is valid or not.

Detailed Example Of The Ping Process

Taking our example e-mail address “not.a.valid.emailaddress.12345qa@gmail.com”, let’s step through another example using some readily available, desktop tools. The tools we’re using here are available in most of the Windows.

Tools Required to Replicate

  • Telnet Client (for instance Microsoft Telnet Client or another equivalent)
  • Console Application (for instance Microsoft Command Console or equivalent)

How To Use These Tools

To Enable a Telnet Client In Windows 8 and 8.1.

See here: http://youtu.be/f3-5Yrfk-h0

To Open a Console in Windows

See here: http://www.computerhope.com/issues/chdos.htm

Low Level Walk Through Of E-mail Address Ping

Step 1 – Find The Mail Server

In a console, type:

nslookup

set q=mx

gmail.com

Below is the output from the console window:

C:\>nslookup

Default : google-public-dns-a.google.com

Address: 8.8.8.8

> set q=mx

> gmail.com

Servers: google-public-dns-a.google.com

Address: 8.8.8.8

Nonauthoritative answer:

  • gmail.com MX preference = 25, mail exchanger = alt2.gmail-smtp-in.l.google.com
  • gmail.com MX preference = 45, mail exchanger = alt4.gmail-smtp-in.l.google.com
  • gmail.com MX preference = 35, mail exchanger = alt3.gmail-smtp-in.l.google.com
  • gmail.com MX preference = 10, mail exchanger = gmail-smtp-in.l.google.com
  • gmail.com MX preference = 15, mail exchanger = alt1.gmail-smtp-in.l.google.com

For the sake of this example, we will use server gmail-smtp-in.l.google.com.

Step 2 – Connecting To The Mail Server

Open another similar console window. Using the mail server above, open a connection as below:

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

You should receive a reply similar to the following:

220 mx.google.com ESMTP kz3si11217105wjc.38 – gsmtp

Step 3 – Having a “Chat” with Mail Server

We type commands into our telnet session as follows:

  1. HELO here.com
  2. MAIL FROM:<me@here.com>
  3. RCPT TO:<not.a.valid.emailaddress.12345qa@gmail.com>

Below is the full transcript of a console, telnet session with the Gmail server for our example e-mail address:

220 mxe.google.com ESMTP u8si7354684wiv.18 – gsmtp

HELO this.com

255 mx.google.com at your service

MAIL FROM:<me@this.com>

250 2.2.0 OK u8si7354684wiv.18 – gsmtp

RCPT TO:<not.a.valid.emailaddress.12345qa@gmail.com>

550-5.1.1 The e-mail account that you tried to reach does not exist. Please try

550-5.1.1 double-checking the recipient’s e-mail address for typos or

550-5.1.1 unnecessary spaces. Learn more at

550 5.1.1 https://support.google.com/mail/bin/answer.py?answer=65966 u8si7354684wi

v.18 – gsmtp

quit

221 2.0.0 closing connection u8si7354684wiv.18 – gsmtp

Connection to host is lost.

Step 4 – Determining Results

The whole conversation with the mail server provides the result that “not.a.valid.emailaddress.12345qa@gmail.com” is not a valid e-mail address. See the lines starting with codes 550-1.1.1.

Conclusion

Pinging email addresses is a reasonably straightforward process once you know how it’s done. Nevertheless, don’t be fooled by the simplicity of the example used in this article. E-mail address pinging is rarely so straightforward.

The things that make the mailbox pings technically challenging are the policies put in place by remote mail servers to check spam. In our example above, I purposely used a Gmail address because Google servers have a reasonably relaxed policy on connecting to them and having a “chat.” Most other mail servers have procedures in place that block the connection from “untrusted” computers.