[issue12147] smtplib.send_message does not implement corectly rfc 2822
Nicolas Estibals nicolas.estib...@gmail.com added the comment: Thanks for your help and the interesting discussion with this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
Nicolas Estibals nicolas.estib...@gmail.com added the comment: Sorry for the late, my week-end was more busy than expected. Here is the corrected version of the patch. -- Added file: http://bugs.python.org/file22511/send_message_rfc2822_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
Nicolas Estibals nicolas.estib...@gmail.com added the comment: Hi, Treating this as a bug is a good news, if we don't user of the function will ask for python 3.3 I also think the part concerning the Sender header is pretty clear and we can fix it easily. About the Resent-* fields, I'm not sure of the right thing to do. But I haven't found the mention of no automatic processing for them but I found that RFC 2822 specify more exactly how to use them. Contrary to the other fields, they have to be in block and the more recent block have to be at the beginning of the mail, moreover they must not be reordered during transfer. Thus I think we have to consider the first block of Resent-* fields if present. (cf. RFC 2822 third paragraph in section 3.6 and appendix A.3) However perhaps we have to wait for an answer from email-sig. I have one more concern about the send_mesage method: if the Bcc field is present this one is deleted, thus we lose information if we copy it in a sent directory for instance. What do you think about the idea that send_message method should not modify the message ? (The sent message should get rid of the Bcc header but not the one the user keep after using the method.) Best regards. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
Nicolas Estibals nicolas.estib...@gmail.com added the comment: I wasn't aware of the problem of guessing which are the correct Resent-* field, tthis does not seem to be that easy, however taking only the first one should be a good heuristic for next release. I think we now agree on the automatic processing part, this only for the receipt part and section 3.6.6 mostly means that From, To, ... fields schould be considered (not the Resent-* fields) while sending an answer for example. For our case it schould be ok to use them as long as ther is no ambiguity (only one Resent-* block). I'm ok for modifying my patch to reflect our discussion. You'll heard some news from it very soon. I'll also add the patch for not mutating the original message. After 3.2.1, I'll work on implementing the few api change you discuss this will make the code very usable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12147] smtplib.send_message does not implement corectly rfc 2822
New submission from Nicolas Estibals nicolas.estib...@gmail.com: smtplib.send_message permits to send messages that are in python Message representation by selecting smtp's from and to in the message headers. Most of the time the implementation is correct but if the message is bounced (Resent-* headers have to be considered) or if there is a Sender field (this one supersede the From field if present), the current implementation does not select the right addresses (not as specified in rfc 2822). I have wrote a patch to make the method compliant. This is my first patch to python but I followed the Lifecycle of a Patch webpage and hope my code will be usable. Please ask me if some revision of the code is needed. -- components: Library (Lib) files: send_message_rfc2822.patch keywords: patch messages: 136508 nosy: Nicolas.Estibals priority: normal severity: normal status: open title: smtplib.send_message does not implement corectly rfc 2822 type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file22061/send_message_rfc2822.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com