A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-February/086132.html below:

[Python-Dev] smtplib violates SMTP spec

[Python-Dev] smtplib violates SMTP spec [Python-Dev] smtplib violates SMTP specFelix Schwarz felix.schwarz at oss.schwarz.eu
Sun Feb 15 17:38:44 CET 2009
Hi,

I would like to get attention to issue 4142 [1] which was filed several months 
ago. This is about a clear bug in smtplib's SMTP implementation which is 
probably present since (at least) Python 1.5.

When re-using an smtplib.SMTP instance for a second connection, smtplib does 
not send another HELO/EHLO which is a clear violation of the SMTP specification.

I built a small patch (changes only 2 lines) but I'm unable to write a unit 
test for this easily because:
   * Python's smtpd does not check if HELO/EHLO was received before MAIL FROM
   * Therefore any extension of test_smtplib would need some patches to check
     this also.

However, the patch is very small so it is very easy to test this manually. 
Just connect to a real world smtp (Exim is best because it is quite strict 
when it comes to SMTP verbs).

fs

[1] http://bugs.python.org/issue4142

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4