cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Databricks and SMTP

746837
New Contributor II

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.

3 REPLIES 3

Atanu
Esteemed Contributor

When you say timing out, what is the error you are seeing in databricks side?

746837
New Contributor II
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()

Babu_Krishnan
Contributor

@746837 , Did you resolve this issue ? 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group