Databricks and SMTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 10:16 AM
Using databricks as aws partner trying to run python script to validate email addresses. Whenever it gets to the smtp portion it times out. I am able to telnet from python to the POP servers and get a response, I can ping domains and get replies, but when trying to telnet to port 25 or 587 of smtp it times out after 15 minutes if there is no timeout set. The security groups all have outbound rules to allow all traffic to destination 0.0.0.0/0 so I'm trying to find out why smtp ports time out only. Any insights if someone has come across this would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 12:15 PM
When you say timing out, what is the error you are seeing in databricks side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 12:42 PM
TimeoutError Traceback (most recent call last)
File <command-3312150305305279>, line 2
1 email = 'geraldgleason@outlook.com'
----> 2 check_email(email)
File <command-3312150305305278>, line 19, in check_email(email)
17 with smtplib.SMTP() as smtp:
18 try:
---> 19 smtp.connect(mx_records[0].exchange.to_text())
20 code, _ = smtp.helo()
21 if code != 250:
File /usr/lib/python3.10/smtplib.py:341, in SMTP.connect(self, host, port, source_address)
339 port = self.default_port
340 sys.audit("smtplib.connect", self, host, port)
--> 341 self.sock = self._get_socket(host, port, self.timeout)
342 self.file = None
343 (code, msg) = self.getreply()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 07:21 PM
@746837 , Did you resolve this issue ?