This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author msapiro
Recipients jcea, msapiro
Date 2009-10-22.18:03:23
SpamBayes Score 1.1469448e-06
Marked as misclassified No
Message-id <1256234606.43.0.752669836687.issue5713@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not completely sure about this, but here's my thoughts. In the
scenarios I've seen, the 421 reply/disconnect only occurs in response to
a RCPT which has an invalid address and follows several prior refused
RCPTs. In this case, I think the proper action is to close the
connection and raise SMTPRecipientsRefused and return a dictionary with
the actual responses for the refused RCPTS prior to the 421 and the 421
response only for the RCPT that produced it.

If the 421 comes at another time, I think the current process does the
right thing. It will raise the appropriate exception if it gets the
chance. It just needs to be sure that if the response was 421 that
instead of doing self.rset() it does self.close().

I have attached a patch against the 2.6.1 smtplib.py which I think does
the right thing. I haven't tested this at all, but I think it should
work. The documentation may need to be updated to emphasize that even
though all recipients aren't listed in the dictionary returned with the
SMTPRecipientsRefused exception, no one got the mail.
History
Date User Action Args
2009-10-22 18:03:26msapirosetrecipients: + msapiro, jcea
2009-10-22 18:03:26msapirosetmessageid: <1256234606.43.0.752669836687.issue5713@psf.upfronthosting.co.za>
2009-10-22 18:03:24msapirolinkissue5713 messages
2009-10-22 18:03:24msapirocreate