Bug 419721

Summary: smtplib.py: can't connect to smtp server over ssl, port 465
Product: Red Hat Enterprise Linux 5 Reporter: Jan Navratil <jnavrati>
Component: pythonAssignee: James Antill <james.antill>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: low    
Version: 5.3CC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-11 14:09:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Navratil 2007-12-11 13:14:46 UTC
Description of problem:


Version-Release number of selected component (if applicable):
python-2.4.3-19.el5

How reproducible:
Always

Steps to Reproduce:
1. run python
2. import smtplib
3. connect to some server that supports smtp over ssl (port 465), e.g.
   server = smtplib.SMTP('smtp.gmail.com:465')
  
Actual results:
it freeze in a infinite loop

Expected results:
successful connection to server

Additional info:
This problem is solved in http://aleph-null.tv/downloads/ssmtplib.py. 
I.e.:
import ssmtplib
server = ssmtplib.SMTP_SSL('smtp.gmail.com:465')
# connected

Is the smtplib sufficient for encrypted connection? Is there any other way how
to connect to smtp server over ssl with python? Or is this a bug?

Thanks for answers.

Jan Navratil

Comment 1 James Antill 2007-12-11 14:09:37 UTC
 From what I can see smtplib only supports starttls, and not 465 SSL ports.
 It doesn't look like a hard feature to add upstream though, and after it's in
Fedora I'd look at adding it for 5.4 etc. (assumption being it's a 2-10 line patch).


Comment 2 Caolan McNamara 2007-12-12 17:33:55 UTC
caolanm->jnavrati/james.antill: Is there already a known upstream python bug/RFE
logged for this or should we do this ?