This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lcatucci
Recipients bronger, giampaolo.rodola, lcatucci, r.david.murray
Date 2011-06-17.21:09:35
SpamBayes Score 4.430012e-12
Marked as misclassified No
Message-id <>
In-reply-to <>
On Fri, 17 Jun 2011, R. David Murray wrote:

RDM> R. David Murray <> added the comment:
RDM> According to your traceback you should be seeing the error in the 
RDM> first line (the creation of the SMTP_SSL object).  If I run that line 
RDM> at the python prompt of python2.7.1, I get your connection failure.  
RDM> If I run it using 2.7 tip (or 3.3 tip), the connection succeeds.  I 
RDM> know there have been other fixes in this area, but I don't know which 
RDM> one makes the difference.
RDM> Torsten, can you test with 2.7.2 and/or 2.7 tip?
RDM> I'm not sure what is left to do in this issue.  Do you have an 
RDM> opinion, Lorenzo?

Torsten, would you mind letting us know both the python and the .deb 
version by running 

$ python2.7 --version


$ dpkg -l python2.7

At least in debian's python2.7_2.7.1-8, default_port is still an instance 
attribute instead of a class attribute. 

If the ubuntu situation is the same, the missing patch is 
smtplib_01_default_port.diff , and you could work-around the problem by 
explicitly calling s = smtplib.SMTP_SSL("", 465).

The patch got in with:

changeset:   69931:bcf04ced5ef1
branch:      2.7
parent:      69915:7c3a20b5943a
user:        Antoine Pitrou <>
date:        Sat May 07 19:59:33 2011 +0200
summary:     Issue #11927: SMTP_SSL now uses port 465 by default as 
documented.  Patch by Kasun Herath.

The last hunk, which fixes LMTP is still missing.

@@ -776,8 +777,9 @@
     authentication, but your mileage might vary."""

     ehlo_msg = "lhlo"
+    default_port = LMTP_PORT

-    def __init__(self, host = '', port = LMTP_PORT, local_hostname = 
+    def __init__(self, host = '', port = 0, local_hostname = None):
         """Initialize a new instance."""
         SMTP.__init__(self, host, port, local_hostname)

Have a nice week-end, yours


|   Lorenzo M.  Catucci   | Centro di Calcolo e Documentazione           |
| | Università degli Studi di Roma "Tor Vergata" |
|                         | Via O. Raimondo 18 ** I-00173 ROMA  ** ITALY |
|  Tel. +39 06 7259 2255  | Fax. +39 06 7259 2125                        |
Date User Action Args
2011-06-17 21:09:37lcatuccisetrecipients: + lcatucci, bronger, giampaolo.rodola, r.david.murray
2011-06-17 21:09:36lcatuccilinkissue4470 messages
2011-06-17 21:09:35lcatuccicreate