-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patch smtplib:when SMTPDataError, rset crashes with sslerror #43311
Comments
|
File "smtplib.pyc", line 690, in sendmail traced from a py2.3 - yet unchanged. => hides original error SMTPDataError. such patch for py2.3,py2.4,.. ( I have this patch in my MUST-DO-PATCHes after any -- the patch passes on any error in this rset() location. could cleanly catch socket.sslerror / socket.error / (there should maybe be special a common base Exception --- the same problem is with smtp.quit() on many SSL'ed
(Compare also bug bpo-978833 / shutdown(2)-remedy in -robert |
|
Logged In: YES Where is the patch? :-) |
|
Logged In: YES here (i forgot the upload checkbox?) |
|
The change to the encode_plain method in the patch was done via bpo-1075928 on 2004-12-06. The try/except change around a call to self.rset() was never implemented. |
|
still I think all 3 self.rset()'s in SMTP.sendmail, which are followed by a raise <someerror> statement have to be bracketed with an except clause or so - nowadays better like """ Because the original error must pop up, not a side effect of state cleaning! |
|
ping! When SMTPDataError, SMTPRecipientsRefused, SMTPSenderRefused should be raised, very likely a subsequent error (like closed connection etc.) overlappes the original Exception during self.rset(), and one will not be able to locate the problem on user level in eons .. This patch is still in my vital-patches collection which I have to apply after every Python update since years. |
|
This bug was resolved for SMTPServerDisconnected exceptions but not for SSLError. Is it still reproducible? If so, the attached patch should fix it for 3.x (couldn't test if it does because I don't know how to reproduce the error). |
|
David, do you agree with either of the proposed changes? |
|
Milan's patch should be correct. It would be nice to have a reproducer. |
|
Is this still an issue? The bug is 10 years old and the patch two years. |


Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: