[issue22216] smtplip STARTTLS fails at second attampt due to unsufficiant quit()

2014-08-30 Thread R. David Murray

R. David Murray added the comment:

Thanks, Milan.

I could swear I typed a '6' in the commit message, but apparently not...

New changeset a058760cb069 by R David Murray in branch '3.4':
#22215: have the smtplib 'quit' command reset the state.
http://hg.python.org/cpython/rev/a058760cb069

New changeset d0d4ab0ba70e by R David Murray in branch 'default':
Merge #22215: have the smtplib 'quit' command reset the state.
http://hg.python.org/cpython/rev/d0d4ab0ba70e

New changeset 7288519594de by R David Murray in branch '2.7':
#22215: have the smtplib 'quit' command reset the state.
http://hg.python.org/cpython/rev/7288519594de

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22216] smtplip STARTTLS fails at second attampt due to unsufficiant quit()

2014-08-18 Thread R. David Murray

Changes by R. David Murray :


--
components: +email
nosy: +barry, r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22216] smtplip STARTTLS fails at second attampt due to unsufficiant quit()

2014-08-17 Thread Milan Oberkirch

New submission from Milan Oberkirch:

When using smtplib.SMTP to connect to a SMTP server the instance variables 
esmtp_response survives a SMTP.quit() which results in the following error:

>>> import smtplib
>>> smtp = smtplib.SMTP('mail.oberkirch.org', 25)
>>> smtp.starttls()
(220, b'2.0.0 Ready to start TLS')
>>> smtp.ehlo()
(250, b'mail.oberkirch.org\nPIPELINING\nSIZE 1024\nVRFY\nETRN\nAUTH PLAIN 
LOGIN\nAUTH=PLAIN LOGIN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN')
>>> smtp.quit()
(221, b'2.0.0 Bye')
>>> smtp.connect('mail.oberkirch.org', 25)
(220, b'mail.oberkirch.org ESMTP Postfix')
>>> smtp.starttls()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.4/smtplib.py", line 672, in starttls
raise SMTPException("STARTTLS extension not supported by server.")
smtplib.SMTPException: STARTTLS extension not supported by server.
>>>

While reporting this issue I found out that starttls also does not throw away 
any ehlo information as it should. Provided that fixing this would probably 
break existing code (which would only work with non-standard servers like 
postfix) I did not change that behaviour.

--
components: Library (Lib)
files: quit_resets_greeting.patch
keywords: patch
messages: 225450
nosy: zvyn
priority: normal
severity: normal
status: open
title: smtplip STARTTLS fails at second attampt due to unsufficiant quit()
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36396/quit_resets_greeting.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com