Every request is timing out. #39

Closed
opened 2020-12-21 21:40:32 +01:00 by hdanirwin · 9 comments
hdanirwin commented 2020-12-21 21:40:32 +01:00 (Migrated from github.com)

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)

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](https://user-images.githubusercontent.com/68263827/102820351-1a9a9280-43a3-11eb-9ee3-540b388d460f.png) Hunter.io has no problem verifying the email address: ![image](https://user-images.githubusercontent.com/68263827/102820180-d3ac9d00-43a2-11eb-814c-6788359a48c4.png) (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 commented 2020-12-22 11:18:08 +01:00 (Migrated from github.com)

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.
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 commented 2020-12-22 11:19:38 +01:00 (Migrated from github.com)

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

Oh, I forgot you have macos. There, the command specified above has to be run from within a terminal window.
hdanirwin commented 2020-12-22 23:26:09 +01:00 (Migrated from github.com)

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?

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 commented 2020-12-22 23:49:41 +01:00 (Migrated from github.com)

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

Not really. I use zenmate but I never tested it with this. I have my own servers for when I want to test.
hdanirwin commented 2020-12-23 00:19:01 +01:00 (Migrated from github.com)

Well, I'm trying AWS's free tier right now and can't for the life of me
figure out which setting I'm missing. We'll see what their support says. If
that doesn't work I'll try zenmate. Either way I'll report back.

Thanks both for making this and for being so responsive!

On Tue, Dec 22, 2020 at 5:49 PM László Károlyi notifications@github.com
wrote:

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


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/karolyi/py3-validate-email/issues/39#issuecomment-749818758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQIZ7E7VLHMP5ZD4YSUS7UTSWEPBHANCNFSM4VEWSLZA
.

Well, I'm trying AWS's free tier right now and can't for the life of me figure out which setting I'm missing. We'll see what their support says. If that doesn't work I'll try zenmate. Either way I'll report back. Thanks both for making this and for being so responsive! On Tue, Dec 22, 2020 at 5:49 PM László Károlyi <notifications@github.com> wrote: > Not really. I use zenmate but I never tested it with this. I have my own > servers for when I want to test. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/karolyi/py3-validate-email/issues/39#issuecomment-749818758>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AQIZ7E7VLHMP5ZD4YSUS7UTSWEPBHANCNFSM4VEWSLZA> > . >
karolyi commented 2020-12-23 00:27:39 +01:00 (Migrated from github.com)

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.

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 commented 2020-12-23 01:40:29 +01:00 (Migrated from github.com)

Nothing is easy....

Sent from my iPhone

On Dec 22, 2020, at 6:27 PM, László Károlyi notifications@github.com wrote:


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.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Nothing is easy.... Sent from my iPhone > On Dec 22, 2020, at 6:27 PM, László Károlyi <notifications@github.com> wrote: > >  > 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. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe.
hdanirwin commented 2020-12-24 16:38:10 +01:00 (Migrated from github.com)

Update: Got it to work on AWS, just needed to ask them to open up port 25
(when asked why and what I would do to prevent spam abuse I was honest and
told them I wanted to use this package and would just turn off the instance
when not using)

On Tue, Dec 22, 2020 at 7:40 PM Dan Irwin <> wrote:

Nothing is easy....

Sent from my iPhone

On Dec 22, 2020, at 6:27 PM, László Károlyi notifications@github.com
wrote:



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.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/karolyi/py3-validate-email/issues/39#issuecomment-749834158,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQIZ7E2H3UQGUR7OMHB2HRLSWETPTANCNFSM4VEWSLZA
.

Update: Got it to work on AWS, just needed to ask them to open up port 25 (when asked why and what I would do to prevent spam abuse I was honest and told them I wanted to use this package and would just turn off the instance when not using) On Tue, Dec 22, 2020 at 7:40 PM Dan Irwin <> wrote: > Nothing is easy.... > > Sent from my iPhone > > On Dec 22, 2020, at 6:27 PM, László Károlyi <notifications@github.com> > wrote: > >  > > 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. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/karolyi/py3-validate-email/issues/39#issuecomment-749834158>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AQIZ7E2H3UQGUR7OMHB2HRLSWETPTANCNFSM4VEWSLZA> > . > >
karolyi commented 2020-12-24 16:40:17 +01:00 (Migrated from github.com)

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.

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 in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: karolyi/py3-validate-email#39
No description provided.