[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes
Leslie P. Polzer added the comment: Sounds reasonable, I will propose a patch soon. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes
Leslie P. Polzer added the comment: Sorry for the confusion, the second comment (#msg203622) should actually have been a separate ticket. Since you'd like to preserve conn I will just change the title of this ticket. -- title: smtpd.py (SMTPChannel): get rid of conn attribute - smtpd.py (SMTPChannel): implement enhanced status codes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes
Leslie P. Polzer added the comment: I am indeed referring to the enhanced status codes proposed in RFC 3463. This would just entail adding information to the status codes, converting them from the format simple status code human-readable string to simple status code enhanced status code human-readable string. In this it doesn't seem necessary to differentiate by HELO/EHLO; neither is it demanded by the standard nor does it result in an incompatible form of traditional HELO status messages. HELO clients should just interpret the first three digits and regard the rest as part of the human readable informal section. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19678] smtpd.py: channel should be passed to process_message
New submission from Leslie P. Polzer: process_message needs to have access to the channel state since it needs to make decisions based on the authentication or transport associated with the channel. It should be either the first or the last arg. I can provide a patch for this. Should backwards compatibility be achieved by using the inspect module to check the signature of process_message and call it accordingly? -- components: Library (Lib), email messages: 203609 nosy: barry, lpolzer, r.david.murray priority: normal severity: normal status: open title: smtpd.py: channel should be passed to process_message type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19678 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19679] smtpd.py: implement ESMTP status messages
New submission from Leslie P. Polzer: ESMTP status messages (of the form xab x.y.z test) can be added easily to the current status message strings emitted by the SMTP server and channel classes. They are not harmful if the user's server only intends to support plain HELO-SMTP I will provide a patch within due time unless someone disagrees. -- components: Library (Lib), email messages: 203610 nosy: barry, lpolzer, r.david.murray priority: normal severity: normal status: open title: smtpd.py: implement ESMTP status messages type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19679] smtpd.py (SMTPChannel): get rid of conn attribute
Leslie P. Polzer added the comment: The contents of conn are already stored by asyncore's socket attribute, so there doesn't seem to be a need to keep it around. We should deprecate its usage and refer the user to the socket attribute. Furthermore I suggest renaming the conn argument to socket to make its semantics clearer. -- title: smtpd.py: implement ESMTP status messages - smtpd.py (SMTPChannel): get rid of conn attribute ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19662] smtpd.py should not decode utf-8
New submission from Leslie P. Polzer: http://hg.python.org/cpython/file/3.3/Lib/smtpd.py#l289 as of now decodes incoming bytes as UTF-8. An SMTP server must not attempt to interpret characters beyond ASCII, however. Originally mail servers were not 8-bit clean, meaning they would only guarantee the lower 7 bits of each octet to be preserved. However even then they were not expected to choke on any input because of attempts to decode it into a specific extended charset. Whenever a mail server does not need to interpret data (like base64-encoded auth information) it is simply left alone and passed through. I am not aware of the reasons that caused the current state, but to correct this behavior and make it possible to support the 8BITMIME feature I suggest decoding received bytes as latin1, leaving it to the user to reinterpret it as UTF-8 or whatever charset they need. Any other simple extended encoding could be used for this, but latin1 is the default in asynchat. The documentation should also mention charset handling. I'll be happy to submit a patch for both code and docs. -- components: Library (Lib) messages: 203467 nosy: skypher priority: normal severity: normal status: open title: smtpd.py should not decode utf-8 type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19662 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12816] smtpd uses library outside of the standard libraries
Changes by Leslie P. Polzer pol...@port-zero.com: -- nosy: +lpolzer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12816 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16462] smtpd should return greeting
Changes by Leslie P. Polzer pol...@port-zero.com: -- nosy: +lpolzer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16462 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8503] smtpd SMTPServer does not allow domain filtering
Changes by Leslie P. Polzer pol...@port-zero.com: -- nosy: +lpolzer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8503 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3802] smtpd.py __getaddr insufficient handling
Changes by Leslie P. Polzer pol...@port-zero.com: -- nosy: +lpolzer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3802 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19662] smtpd.py should not decode utf-8
Leslie P. Polzer added the comment: Patch attached. This also adds some more charset clarification to the docs and corrects a minor spelling issue. It is also conceivable that we add a charset attribute to the class. This should have the safe default of latin1, and some notes in the docs that setting this to utf-8 (and probably other utf-* encodings) is not really standards-compliant. -- keywords: +patch Added file: http://bugs.python.org/file32719/smtpd_charset_latin1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19662 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19662] smtpd.py should not decode utf-8
Leslie P. Polzer added the comment: Since this is my first contribution I'm not entirely sure about the fine details of backwards compatibility in Python, so please forgive me if I'm totally missing the mark here. There are facilities in smtpd's parent class asynchat that perform the necessary conversions automatically if the user sets an encoding, so smtpd should be adjusted to rely on that and thus give the user the opportunity to choose for themselves. Then it boils down to breaking backwards compatibility by setting a default encoding, which could be none as you suggest or latin1 as I suggest; either will probably be painful for current users. My take here is that whoever is using this code for their SMTP server and hasn't given the encoding issues any thought will need to take a look at their code in that respect anyway, so IMHO a break with compatibility might be a bit painful but necessary. If you agree then I will gladly rework the patch to have smtpd work with an underlying byte stream by default, rejecting anything non-ASCII where necessary. Later patches could bring 8BITMIME support to smtpd, with charset conversion as specified by the MIME metadata. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19662 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com