-1

I have to check the validity of around 1 million email addresses, I don't care if the email is "deliverable", I just want to check if the structure is right and the domain exists. To accomplish this I'm using Email::Valid module with the option -mxcheck which use Net::DNS module as well, but I'm afraid of to be taken as spammer for using it too much (as happen with nslooukup utility). So, can this happen with Net::DNS module?

Hope you can help me.

Regards

  • surely there aren't 1 million different domains? it doesn't seem like you'd want Email::Valid to check gmail.com hundreds of thousands of times instead of just doing it once yourself. – ysth Aug 21 '15 at 18:44

1 Answers1

1

Net::DNS does the same thing as nslookup and other tools, it sends a DNS query to a DNS server and processes the reply. I don't know which DNS server you used with nslookup but with both nslookup and Net::DNS you can specify the DNS server to use and maybe you'll find some DNS server which does not consider your activity as spamming. As an example you might try the DNS server provided by google: 8.8.8.8.

Alternatively you can setup your own recursive DNS server on the local machine it let this server resolve all the queries and cache the results. When setup without forwarder the server will not use your ISP's DNS server to resolve all queries but instead ask the DNS servers responsible for the specific domains.

In case you did not understand any of these recommendations I would suggest to have a look at how DNS works.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172
  • Additionally, it is generally considered pretty poor behavior to pound the daylights out of someone else's server with a misconfigured script, even if it is offering a service to the internet at large. I think my personal record was the day I had 20k queries/second hitting my DNS servers because a professor was teaching his class how to do lookups with perl. In short, be nice to other people's stuff. – Rick Buford Aug 22 '15 at 18:25