[New-bugs-announce] [issue4142] smtplib doesn't clear helo/ehlo flags on quit

Don Dwiggins report at bugs.python.org
Fri Oct 17 22:02:42 CEST 2008

New submission from Don Dwiggins <ddwiggins at advpubtech.com>:

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

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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list