Validation from Secured EC2 #26

Closed
opened 2020-06-17 20:04:01 +02:00 by sweldon · 2 comments
sweldon commented 2020-06-17 20:04:01 +02:00 (Migrated from github.com)

Hi, quick question regarding validation from my HTTPS EC2. I'll start by saying all works perfectly locally, so I'm wondering if you've had this issue before or have any tips when using on AWS.

I have opened port 25 on my ec2's security group for all inbound requests (all outbound requests open as well). Additionally, I can send emails using Gmail's smtp server successfully from my EC2. In the mean time I have contacted AWS to ask if there are any restrictions in place that they can lift. Below is my error:

>>> validate_email(email_address='some_email_to_validate@test.com', check_mx=True, from_address='from_my_email@gmail.com', helo_host='smtp.gmail.com', smtp_timeout=10, dns_timeout=10, use_blacklist=True, debug=True)
13:45:37.654641 connect: ('alt3.gmail-smtp-in.l.google.com.', 25)
13:45:37.654772 connect: to ('alt3.gmail-smtp-in.l.google.com.', 25) None
13:45:47.665600 connect: ('alt2.gmail-smtp-in.l.google.com.', 25)
13:45:47.665773 connect: to ('alt2.gmail-smtp-in.l.google.com.', 25) None
13:45:57.678526 connect: ('alt1.gmail-smtp-in.l.google.com.', 25)
13:45:57.678581 connect: to ('alt1.gmail-smtp-in.l.google.com.', 25) None
13:46:07.691279 connect: ('gmail-smtp-in.l.google.com.', 25)
13:46:07.691333 connect: to ('gmail-smtp-in.l.google.com.', 25) None
13:46:17.704288 connect: ('alt4.gmail-smtp-in.l.google.com.', 25)
13:46:17.704344 connect: to ('alt4.gmail-smtp-in.l.google.com.', 25) None
Validation for 'some_email_to_validate@test.com' failed: Email address undeliverable:
alt3.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable
alt2.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable
alt1.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable
gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable
alt4.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable
False

Any help is greatly appreciated (note: I have also read through the other issue on the repo https://github.com/karolyi/py3-validate-email/issues/19).

Thanks!

Hi, quick question regarding validation from my HTTPS EC2. I'll start by saying all works perfectly locally, so I'm wondering if you've had this issue before or have any tips when using on AWS. I have opened port 25 on my ec2's security group for all inbound requests (all outbound requests open as well). Additionally, I can send emails using Gmail's smtp server successfully from my EC2. In the mean time I have contacted AWS to ask if there are any restrictions in place that they can lift. Below is my error: ``` >>> validate_email(email_address='some_email_to_validate@test.com', check_mx=True, from_address='from_my_email@gmail.com', helo_host='smtp.gmail.com', smtp_timeout=10, dns_timeout=10, use_blacklist=True, debug=True) 13:45:37.654641 connect: ('alt3.gmail-smtp-in.l.google.com.', 25) 13:45:37.654772 connect: to ('alt3.gmail-smtp-in.l.google.com.', 25) None 13:45:47.665600 connect: ('alt2.gmail-smtp-in.l.google.com.', 25) 13:45:47.665773 connect: to ('alt2.gmail-smtp-in.l.google.com.', 25) None 13:45:57.678526 connect: ('alt1.gmail-smtp-in.l.google.com.', 25) 13:45:57.678581 connect: to ('alt1.gmail-smtp-in.l.google.com.', 25) None 13:46:07.691279 connect: ('gmail-smtp-in.l.google.com.', 25) 13:46:07.691333 connect: to ('gmail-smtp-in.l.google.com.', 25) None 13:46:17.704288 connect: ('alt4.gmail-smtp-in.l.google.com.', 25) 13:46:17.704344 connect: to ('alt4.gmail-smtp-in.l.google.com.', 25) None Validation for 'some_email_to_validate@test.com' failed: Email address undeliverable: alt3.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable alt2.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable alt1.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable alt4.gmail-smtp-in.l.google.com.: [Errno 101] Network is unreachable False ``` Any help is greatly appreciated (note: I have also read through the other issue on the repo https://github.com/karolyi/py3-validate-email/issues/19). Thanks!
karolyi commented 2020-06-17 22:16:39 +02:00 (Migrated from github.com)

Hey,

using Gmail's smtp server

What is this exactly? never heard about it before.

As for the network unreachable error, it is what it says, you can't reach that port, apparently. What you can try to see that it's not just the validator, is to log into one of the EC2 instances and use the telnet command to see if the connection establishes. For example, telnet alt3.gmail-smtp-in.l.google.com 25, and look at what output it gives you.

Hey, > using Gmail's smtp server What is this exactly? never heard about it before. As for the network unreachable error, it is what it says, you can't reach that port, apparently. What you can try to see that it's not just the validator, is to log into one of the EC2 instances and use the telnet command to see if the connection establishes. For example, `telnet alt3.gmail-smtp-in.l.google.com 25`, and look at what output it gives you.
sweldon commented 2020-06-19 19:28:44 +02:00 (Migrated from github.com)

Hey @karolyi thanks for the follow up. Just wanted to update you that AWS got back to me and it was indeed a restriction on SMTP outside of the obvious port 25 opening on the security group. All working now!

For anyone seeing this later, if you're having issues using this with your EC2 contact AWS using this form https://console.aws.amazon.com/support/contacts?#/rdns-limits, and ask them to remove the email sending limitations on your elastic IP.

Hey @karolyi thanks for the follow up. Just wanted to update you that AWS got back to me and it was indeed a restriction on SMTP outside of the obvious port 25 opening on the security group. All working now! For anyone seeing this later, if you're having issues using this with your EC2 contact AWS using this form https://console.aws.amazon.com/support/contacts?#/rdns-limits, and ask them to remove the email sending limitations on your elastic IP.
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#26
No description provided.