hbattat / verifyEmail

PHP class that can be easily used to verify an email address and make sure it is valid and does exist on the mail server. For a supported option please visit the site
https://hbattat.com/verifyemail.html
Apache License 2.0
545 stars 170 forks source link

After using this tool my IP was blocked #8

Closed Keberdle closed 7 years ago

Keberdle commented 9 years ago

Hello, after I try this tool on my localhost (10-20 emails) my IP was listed on blacklist. Same problem on webserver - there was checking 1300 emails.

I try it before we move emailing from eshop to mailchimp.

Listed on: Blacklist Reason TTL ResponseTime
LISTED CBL
LISTED Spamhaus ZEN ( by CBL)

Removed is simply but emails from webserver until do not sendig correctly.

zscally commented 9 years ago

You should not run random scripts your find on the internet unless you truly understand what they are doing... This script should be used at your own risk...

slifin commented 9 years ago

I had this same issue, you will have your emails dropped if you use this code I suspect it's related to the fact the HELO response uses the target server's IP back at itself

ck-on commented 9 years ago

RFC mail spec says the HELO is supposed to be YOUR server's FQDN (and best make sure RDNS is setup for that domain name)

NOT the other server's name, you HELO identify yourself, not the server's name you are connecting to.

But there are other problems with this script, like some servers send multiple 220 lines when you connect and I had to rewrite parts of this to "eat" the connect reply.

Also needs timeout on the connect and timeout on the transfer.

Also the built in DNS functions in PHP will translate a 127.0.0.1 set on the remote DNS to your local IP !!! This means you will try to connect to your own server and can be tricked.

Also PHP DNS function do not have a timeout setting. So had to use exec with DIG instead.

chamnap commented 8 years ago

By the way, how to avoid of being treated as spam?

ghost commented 8 years ago

its not providing result for yahoo & hotmail/outlook. Is there any solution for this? or any way to make it universal for all email server. Besides that i am trying to find some way for the blacklist issue.

Any suggestions regarding these will be appreciated.

soufiane-fadil commented 8 years ago

The same thing here, how can i check emails without being blocked ? or maybe another tool/method ?

hbattat commented 8 years ago

Hi all! Sorry I have never gotten the chance to respond to this issue, but now I have updated the script and have been running tests agains many emails addresses with no issues.

The code did not change much other than making it cleaner and object oriented. However is it worth pointing out that the server where you are running this script need to be configured correctly as a mail server. That means is you send a message from an email on your server it should not be blocked or placed in Junk/Spam folders.

This is important to guarantee that your server/IP does not get blacklisted. To check your mail server health/score there are many tools available to verify DomainKeys, SPF, and DMARC records.

I usually use https://www.mail-tester.com where they ask you to send an email from you server to an address that they provide then they run a report and suggest how to fix any issues. You typically do not want anything less that 10/10 as a result.

Here is the test server I set up for the latest code changes https://verifye.ml and this is the result from Mail Tester https://www.mail-tester.com/web-PY87Cs

RazaLabs commented 8 years ago

@hbattat It will be appreciated if you can provide detailed information on how to setup the mail server.

hbattat commented 8 years ago

@RazaLabs here you go: http://curlybrac.es/2016/07/27/how-to-configure-a-mail-server/

imcda commented 8 years ago

Hi, hbattat:

if I want to set a mail server, should I buy a linode VPS, and set it as mail sever by postfix like https://www.linode.com/docs/email/running-a-mail-server .

I use your code run correctly in my Mac XAMPP at home, and my IP was on the blacklist.

PS. I don't know how to remove my IP from blacklist. Can you give me some advice?

So I want to buy a linode VPS to set mail server and run your code in the sever?

Thx a lot.

hbattat commented 8 years ago

I don't know how you would get your IP removed from blacklist, but I encourage you to test your mail server before running to code to make sure it is not treated as spam (see the blog post for how to set up and test mail server)

I use VPS Dime for my VPS, it is been very reliable and great service. Their prices start at $7/mo for 6gb of RAM VPS. but any vps hosting should work the same. If you decide to got with VPS Dime, please sign up using my referral link https://vpsdime.com/aff.php?aff=1231 so I can get credit :)

Here is my blog post about setting up the server http://curlybrac.es/2016/07/27/how-to-configure-a-mail-server/