Bug 419721 - smtplib.py: can't connect to smtp server over ssl, port 465
Summary: smtplib.py: can't connect to smtp server over ssl, port 465
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python
Version: 5.3
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: James Antill
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-11 13:14 UTC by Jan Navratil
Modified: 2007-12-12 17:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-11 14:09:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ?


Note You need to log in before you can comment on or make changes to this bug.