7 points · by duroth · 11y ago · 13 comments
What is the best way to verify that an e-mail address belongs to a business ("work") domain? For example, I don't want _john.doe@gmail.com_ or _jane.doe@outlook.com_. But I do want _johnny@apple.com_ or _ma.baker@thebakercompany.com_.
The first thing that comes to me is to have a rule to exclude gmail.com, outlook.com, yahoo.com, but there are huge amounts of those and it feels stupid to me.
Any thoughts?
Unless you don't have better things to do with your time, I will suggest focusing your time on things that are more important.
https://github.com/ivolo/disposable-email-domains/blob/maste...
New domains are added to the list via pull requests.
Here's a post I wrote with an implementation of this approach (specific to Marketo forms, but can be made generic for any form): http://developers.marketo.com/blog/restrict-free-email-domai...
I would also recommend labeling the email address field on the form, "Work Email."
Just start with a blacklist for the big ones, and then manually opt-in domains after a look at a domain's webpage under pg's "do things that don't scale" mantra.
whois 'domain foo.com'
likely return an admin contact at foo.com even if they're using Google Apps?
https://gist.github.com/tbrianjones/5992856
P.S. Maybe someone should make an API to verify if a domain is free/public or not :)
You have two options:
a) Whitelist all domains you want (if you only want specific 'work' domains)
b) Blacklist those you do not want
In the situation I need it in, that's an OK solution, but I was interested in finding out if there exists a better solution.
This is how, eg, anti spam often works.