How to check whether an email address exists?

26

21

I'm trying to check 2,000 email addresses to see whether they exist. Are there ways to check whether an email address is valid without sending email to each address?.

I found an online service Email Unlimited, but it only checks 20 email addresses before having to buy the full version.

tintincutes

Posted 2010-12-20T11:59:34.683

Reputation: 1 087

Answers

37

Just for the sake of completeness: some SMTP servers do indicate if an email address exists. Following a full example in another answer:

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

helo example.com
mail from: <me@example.com>
rcpt to: <somenonexistinguser@gmail.com>
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://mail.google.com/support/bin/answer.py?answer=6596

Upon success, and on servers that cannot or do not want to tell if an address is valid, the last command would yield:

250 2.1.5 OK

One could then simply invoke quit without sending any email at all. Still, when trying many addresses, this might also get you blocked.

(Gmail does not support the vrfy command. On the website, it also has a "check availability" button when signing up for a new Gmail account. That could also give you some information, but old addresses will be unavailable for some time.)

Arjan

Posted 2010-12-20T11:59:34.683

Reputation: 29 084

@Arjan I wrote a small python script to automate this https://gist.github.com/arulrajnet/c613bd0fad5de00bab2e

– Arul – 2014-11-26T13:32:25.870

First test an address that is unlikely to exist (e.g. uh57fxetomx7ei5@example.com), if that returns 250, give up. – Zaz – 2015-10-18T16:20:09.877

Try this Perl module here https://metacpan.org/pod/release/ILYAM/Mail-CheckUser-1.19/CheckUser.pm

– Klemen Tušar – 2017-01-24T08:10:53.060

1SMTP defines the VRFY command for this purpose. – user1686 – 2010-12-20T19:21:56.490

@grawity, that might be true in theory, but VRFY does NOT work with Gmail. (See my comment at Michael's answer.)

– Arjan – 2010-12-20T23:41:12.630

2Not all servers respond with a "does not exist" error for missing accounts, so this is not completely reliable. If the server is an proxy (and/or external secondary server) for a number of other servers it might not know which accounts are valid on the next hop so will give "250 OK" for anything, and some servers are set this way in to stop spammers trying to enumerate valid accounts. A quick test of some of our clients mail servers showed 1 of the 5 I tried did not give a 5xx response for an non-existent account. – David Spillett – 2010-12-21T08:40:06.263

(@David, I know. That's why I used the word "some" above... But I've emphasised that a bit.) – Arjan – 2010-12-21T10:22:59.347

23

If this were possible, spammers worldwide would be singing with joy.

Sorry but no, it's not possible to know whether any given e-mail address exists or not.

In my opinion, this is a feature!

  • If you know your correspondents, then you will know their contact information.
  • If you don't know your correspondents, then you're a stranger and they will not appreciate getting unsolicited mail from you.
  • If you used to know your correspondents and they haven't kept you informed of their address changes, then they've made an (un?)conscious decision to not receive your mail.

The best you can do is to send out an e-mail to your list and then remove those that bounce (= those that could not be delivered).

Be careful! In some countries it is illegal to send unsolicited bulk e-mail to people who haven't explicitly allowed this in advance.

Torben Gundtofte-Bruun

Posted 2010-12-20T11:59:34.683

Reputation: 16 308

I can definitely appreciate your answer as nobody likes spam, but this is not always true; just sayin'. For example, Gmail keeps a record of anyone you've ever emailed or who has emailed you. I have contact details for many classmates from my college days and would like to validate their emails to determine whether I should hold on to their contacts or delete them. This would be a perfectly legitimate use for this kind of functionality. ;) – Chiramisu – 2015-06-12T05:35:29.500

Thanks for this. But yes, we know the contacts but some of them didn't update their contact details with us when they changed positions or companies. We sent out newsletter last time and it bounces back email addresses and our account was reactivated because of the high percentage of the bounces of emails. I found one in the internet but not sure if this is reliable: http://verify-email.org/

– tintincutes – 2010-12-20T12:20:36.590

2+1 - if it worked it would quickly be abused. This is why we can't have nice things! – David Spillett – 2010-12-20T12:44:00.863

2Not sure why this is strongly upvoted. The ethics 101 lesson? I've seen something like what the OP wants being used, and not even for nefarious purposes. The other answers and comments suggest it's possible for many mail servers, especially corporate/non-Google. – Daniel Beck – 2010-12-20T19:59:03.047

1@Daniel: it is certainly possible for some (many, in fact) mail servers/services - but it is not reliably possible nor is is necessarily reliable for any given address. I up-voted for the technical correctness of "you can't know for sure" rather than any ethical aspect. – David Spillett – 2010-12-21T08:44:32.530

1

People who were used as the fake sender of spam runs, won't be too happy about this "feature" when receiving lots of backscatter. (Apart from the occasional bounce message from runs that use a different From, Reply-to or Return-Path for each message, I've received thousands of bounce messages on two occasions. Easily filtered, still not very nice.)

– Arjan – 2010-12-21T10:30:31.410

@tintincute: I think the information you're looking for is in the bounces you received from your last newsletter. – LaC – 2011-02-27T01:33:38.767

It is possible to at least partially check if the email address does not exist by checking if the domain of the email address exists -- if the domain does not exist, the email address is currently invalid and there is no need to check that email address further (at least temporarily). – Abbafei – 2011-02-27T01:53:51.463

http://superuser.com/questions/224015/how-to-check-if-email-address-does-exist - looks very real to me. – guy mograbi – 2014-04-26T10:14:00.123

7

There really isn't any good way to do so. There is a 'VRFY' command in the SMTP protocol, but I don't know anyone who lets that operate anymore - it's too useful to spammers. Most hosts will just refuse the command anymore.

The best you can do right now is to send the e-mail and record what bounces (noting that some mail hosts will just blackhole undeliverable mail instead of bouncing it).

I don't know what your business or purpose is with this list, but you should know that if you go sending e-mail to 2000 people at once, you're likely to get flagged as a spammer by some mail hosts.

Michael Kohne

Posted 2010-12-20T11:59:34.683

Reputation: 3 808

1Probably more like clearing out a contact list. Mails bounce anyway. – Daniel Beck – 2010-12-20T12:21:25.370

Trying to clean out the contacts; I need to design a new contacts database. We have a lot of clients from different companies, not sure if I have to categorize them in one database or would create a different DB for different companies. What would be the best way? – tintincutes – 2010-12-20T12:26:24.107

If I understand correctly, then vrfy would need a username, not an email address? If true, then I guess it's mainly being disabled for security reasons, not to combat spammers? On Gmail, both vrfy existinguser, vrfy existinguser@gmail.com, vrfy someunknownuser and vrfy someunknownuser@gmail.com all yield 252 2.1.5 Send some mail, I'll try my best, while on the very same Gmail rcpt to: does reveal if an email address is valid.

– Arjan – 2010-12-20T13:16:06.877

With vrfy, you connect to a mail server, then vrfy username (the part before the @ in the e-mail address). If it's working, it will tell you yes or no whether the user is real. If it's not working (many are not) then it will either say 'forbidden', or 'I have no idea'. Note that the 'I have no idea' answer is perfectly legitimate for a mail forwarding host that doesn't have access to the underly account list. So even when working, vrfy may not be that useful. – Michael Kohne – 2010-12-21T12:13:39.620

2

It is not possible to accurately determin if an address is real or not - any product that claims it can is exagerating its abilities so you shoudl consider any other claims made with a cynical eye.

There are in existence F/OSS libraries that do as much as it is possible to do: I would guess that most software on the market is just a fancy wrapper around those so you could perhaps easily make your own that is just as good/bad if you have any coding experience. But remember that no matter how good the validation routine is it will be very prone to give both false positive and false negative results.

http://freshmeat.net/projects/emailaddressvalidationcomponent for example comes up on a quick search fo freshmeat and assuming the description is correct it does everything that can actually be done to try verify an address.

David Spillett

Posted 2010-12-20T11:59:34.683

Reputation: 22 424

@DanieL: Ok thanks for this. How about this one? Is this also valid: http://techie-buzz.com/how-to/how-to-verify-if-an-email-address-exists.html

– tintincutes – 2010-12-20T12:48:30.057

@tintincute: looks pretty valid, my Lifehacker source uses the same video... – studiohack – 2010-12-20T20:16:44.227

2

You can ping the email address.

From Lifehacker.com:

http://lifehacker.com/5697360/how-to-verify-if-an-email-address-is-real-or-fake

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

Hit the link for step-by-step instructions on how to ping an email address.

studiohack

Posted 2010-12-20T11:59:34.683

Reputation: 13 125

1

Inside a company context, this could be done by automating a lookups in Active directory.

David

Posted 2010-12-20T11:59:34.683

Reputation: 1 249

1

How about writing a Perl script to automate this job? Check this out: http://search.cpan.org/~ilyam/Mail-CheckUser-1.21/CheckUser.pm

Jassi

Posted 2010-12-20T11:59:34.683

Reputation: 111

This actually uses SMTP commands to connect to an SMTP server, and if you make too many requests too soon you could be labeled as a spammer and blocked. So, not good for checking thousands of emails. – Bulrush – 2016-10-11T17:03:56.790

1

You can try: http://verify-emails.com/

It is still a try and buy service, but it can handle lists as well as single emails and can be incorporated into registration forms.

chris

Posted 2010-12-20T11:59:34.683

Reputation: 19

That domain is for sales. Site is dead. – Bulrush – 2016-10-11T17:02:46.010

1

I also needed a way to verify the existence of email addresses, so I ended up writing my own little utility. (Python)

http://github.com/un33k/python-emailahoy

It is 100% accurate when the provider is honest with you.
(gmail is pretty honest, but yahoo is NOT as it says yes to all emails.)

It is better than nothing, as it reduced the spams by more than %50 for me.

un33k

Posted 2010-12-20T11:59:34.683

Reputation: 111

0

It is possible to check whether an email address exists by using this link: http://verify-email.org/. It pings the email address and responds Ok if the email exists, and Bad if the email is fake or does not exist. one more link helpful for this problem: http://www.shoutmeloud.com/how-to-verify-if-email-address-exist-or-not.html

Bhavinkumar Patel

Posted 2010-12-20T11:59:34.683

Reputation: 101

1st link: it looks like checking single addresses is free, but checking 2000, as asked in the question, requires paid software. That's the situation for which the question seeks an alternative, so this isn't really a solution to the question. 2nd link also deals with single checks. Super User isn't a forum, where it is typical to leave anything that generally relates to the topic. Its purpose is to build a knowledgebase, and each answer should provide a solution to what was asked. Answers that don't tend to attract downvotes. – fixer1234 – 2015-06-30T07:13:18.357