[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2014-03-16 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: test needed -> patch review
versions: +Python 3.4

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2014-03-10 Thread Don Dwiggins

Don Dwiggins added the comment:

Varun, thanks for the patch; sounds like the right way to go, in that it should 
work whether the usage is single-connection or multiple-connection.  Ideally, 
the documentation would be expanded a bit to clarify just which attributes get 
reset on close().

--

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2014-03-09 Thread Varun Sharma

Varun Sharma added the comment:

I have added a patch and it's test case as per martin's suggestions. Now 
function close() resets the attributes :sock, default_port, ehlo_msg, 
ehlo_resp, helo_resp, source_address

But it does *not* reset : debuglevel, does_esmtp,esmtp_features, file, 
local_hostname

I think the attributes does_esmtp, esmtp_features and local_hostname are most 
probably not going to be changed even if someone uses the same object more than 
once.

--
nosy: +varun
Added file: http://bugs.python.org/file34316/flag_reset_4142.patch

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2011-03-14 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
versions: +Python 3.3 -Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2011-02-08 Thread Don Dwiggins

Don Dwiggins  added the comment:

I have no pressing need for it.  I'm happy enough with Martin's idea of 
single-use instances, as long as they're clearly documented as such, and don't 
"pretend" to work for a subsequent connect.  I'd also be happy with instances 
that could be used for multiple connections, as long as that didn't increase 
the complexity of the code too much.

Martin's also right that the similar clients for http and ftp, as well as smtp, 
should all work the same.

--

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2011-02-07 Thread Sandro Tosi

Sandro Tosi  added the comment:

Hello Felix/Don,
are you still interested in seeing this fixed in smtplib? If so, what about 
incorporating Martin's suggestions and propose a new patch for review?

--
nosy: +sandro.tosi -Felix Schwarz
stage:  -> test needed

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2011-01-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2010-08-17 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +alfmel

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2010-04-20 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2010-03-24 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Support for smtpd too? (a stdlib addition in 2.7/3.2)

--
nosy: +jcea
versions: +Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 3.0

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2009-02-15 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

IIUC, the bug only occurs if you use the same SMTP object for multiple
connections. I would claim that this is a bug in the application: SMTP
objects are not designed to be used for multiple connections. You need
to create a new one for each connection.

If you want to extend the SMTP class to work for multiple connections,
the provided patch is incorrect. Resetting the attributes should not be
done in .connect() (i.e. for the new connection), but in .close() (i.e.
when shutting down the previous connection). Furthermore, it should not
only reset the two response attributes, but all per-connection
attributes (which includes e.g. esmtp_features), and a test should be
provided that, after close, only known "good" attributes remain set on
the object (e.g. debuglevel).

--
nosy: +loewis

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2009-02-15 Thread Felix Schwarz

Changes by Felix Schwarz :


--
versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.0

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2009-02-15 Thread Felix Schwarz

Changes by Felix Schwarz :


--
keywords: +patch
Added file: http://bugs.python.org/file13100/helo.patch

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2009-02-15 Thread Felix Schwarz

Felix Schwarz  added the comment:

I can confirm that this issue is still present in Python 2.5.2, 2.6.1
and 3.0.1.

The current behavior of smtplib is a clear violation of the SMTP
specification. The problem can be reproduced with code like that (stub,
pseudo code-like):
smtp = smtplib.SMTP()
smtp.sendmail('f...@example.com', 'f...@example.com', msg)
smtp.quit()
smtp.connect()
# This command does not send EHLO/HELO again, violating the spec!
smtp.sendmail('f...@example.com', 'f...@example.com', msg)

Real world bug reports due to this behavior were mostly visible with
Exim because this MTA rejects the 'MAIL FROM' if SMTP extension verbs
are used without EHLO:
*
http://groups.google.com/group/turbomail-devel/browse_thread/thread/a25c89a94b42724f
* http://www.google.com/search?q=exim+python+%22malformed+address%22+size

--
nosy: +Felix Schwarz

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2008-10-17 Thread Don Dwiggins

New submission from Don Dwiggins <[EMAIL PROTECTED]>:

Found on Windows, running Python 2.4.3.

SMTP.login() and SMTP.sendmail set one of the attributes ehlo_resp or
helo_resp to whatever the server responded (only if they're not already
set).

SMTP.quit() doesn't clear these attributes, so on the next connection,
the HELO/EHLO commands won't be sent; this will cause problems with some
servers (MDaemon in my case).  The fix is obvious, and a workaround
would be to clear the attributes in the instance before calling login
(or sendmail where authentication isn't needed).

--
components: Library (Lib)
messages: 74935
nosy: dwig
severity: normal
status: open
title: smtplib doesn't clear helo/ehlo flags on quit
type: behavior
versions: Python 2.4

___
Python tracker <[EMAIL PROTECTED]>

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