Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Every request is timing out. #39

Closed
hdanirwin opened this issue Dec 21, 2020 · 9 comments
Closed

Every request is timing out. #39

hdanirwin opened this issue Dec 21, 2020 · 9 comments

Comments

@hdanirwin
Copy link

hdanirwin commented Dec 21, 2020

Every email I try and verify times out and then fails. Can't figure out what I'm doing wrong

Here is the output of the debugging:

 (venv) Hs-MacBook-Pro:pythonProject4 hdanforthirwin$ python -c 'import logging, sys; logging.basicConfig(stream=sys.stderr, level=logging.DEBUG); from validate_email import validate_email; print(validate_email("dan@retention360.com", check_mx=True, debug=True))'
DEBUG:filelock:Attempting to acquire lock 4523126688 on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
INFO:filelock:Lock 4523126688 acquired on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
DEBUG:validate_email.domainlist_check:(Re)loading blacklist from /Users/hdanforthirwin/PycharmProjects/pythonProject4/venv/lib/python3.9/site-packages/validate_email/data/blacklist.txt
DEBUG:filelock:Attempting to release lock 4523126688 on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
INFO:filelock:Lock 4523126688 released on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
DEBUG:validate_email.updater:Starting optional update of built-in blacklist.
DEBUG:filelock:Attempting to acquire lock 4531404608 on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
INFO:filelock:Lock 4531404608 acquired on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
DEBUG:validate_email.updater:Not updating because file is fresh enough.
DEBUG:filelock:Attempting to release lock 4531404608 on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
INFO:filelock:Lock 4531404608 released on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
DEBUG:filelock:Attempting to acquire lock 4531470592 on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
INFO:filelock:Lock 4531470592 acquired on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
DEBUG:validate_email.domainlist_check:(Re)loading blacklist from /Users/hdanforthirwin/PycharmProjects/pythonProject4/venv/lib/python3.9/site-packages/validate_email/data/blacklist.txt
DEBUG:filelock:Attempting to release lock 4531470592 on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
INFO:filelock:Lock 4531470592 released on /var/folders/3j/cwnxk5xx3_g3lq398pxd041m0000gn/T/tmp-py3-validate-email-501/blacklistupdater.lock
DEBUG:validate_email.mx_check:Trying ALT1.ASPMX.L.GOOGLE.com ...
DEBUG:validate_email.mx_check:Trying ALT2.ASPMX.L.GOOGLE.com ...
DEBUG:validate_email.mx_check:Trying ASPMX2.GOOGLEMAIL.com ...
DEBUG:validate_email.mx_check:Trying ASPMX3.GOOGLEMAIL.com ...
DEBUG:validate_email.mx_check:Trying ASPMX.L.GOOGLE.com ...
WARNING:validate_email.validate_email:Validation for 'dan@retention360.com' failed: Email address undeliverable:
ALT1.ASPMX.L.GOOGLE.com: timed out
ALT2.ASPMX.L.GOOGLE.com: timed out
ASPMX2.GOOGLEMAIL.com: timed out
ASPMX3.GOOGLEMAIL.com: timed out
ASPMX.L.GOOGLE.com: timed out
False
(venv) Hs-MacBook-Pro:pythonProject4 hdanforthirwin$ 

Other things of note:

I had a lot of trouble getting dnspython installed. Maybe its running, but not actually installed properly? It seems to work when I do a simple socket.gethostbyname_ex() though.

image

Hunter.io has no problem verifying the email address:

image

(On a 2017 MacBook Pro with Big Sur 11.1. PyCharm and Python 3.9. Tried it with both a VPN and no VPN)

@karolyi
Copy link
Owner

karolyi commented Dec 22, 2020

This seems to me that hostname resolution works, but google is blocking port 25 requests from your original IP address as well as VPN address.

To check, you can try and telnet to port 25 of any of those addresses listed above. In windows, this would be:

  • opening a commandline window (win+R, cmd, enter)
  • typing telnet ALT1.ASPMX.L.GOOGLE.com 25 and see what gives.

@karolyi
Copy link
Owner

karolyi commented Dec 22, 2020

Oh, I forgot you have macos. There, the command specified above has to be run from within a terminal window.

@hdanirwin
Copy link
Author

You were right --- it was my internet provider and my VPN that are blocking port 25 access. Interestingly, when I use my phone as a hotspot its fine.

Can you recommend a VPS or VPN that doesn't block port 25?

@karolyi
Copy link
Owner

karolyi commented Dec 22, 2020

Not really. I use zenmate but I never tested it with this. I have my own servers for when I want to test.

@hdanirwin
Copy link
Author

hdanirwin commented Dec 22, 2020 via email

@karolyi
Copy link
Owner

karolyi commented Dec 22, 2020

AWS blocks port 25 in egress, it has been mentioned here somewhere in the closed issues. if you search for it, you'll find it.

@hdanirwin
Copy link
Author

hdanirwin commented Dec 23, 2020 via email

@hdanirwin
Copy link
Author

hdanirwin commented Dec 24, 2020 via email

@karolyi
Copy link
Owner

karolyi commented Dec 24, 2020

Great stuff, thanks for adding your resolution.

If you deem this to be solved, please close the issue or wait 2 weeks until stalebot closes it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants