Pandu E POLUAN <pepol...@gmail.com> added the comment:
The "problem" is that smtplib.SMTP does the following, in essence: 1. Open connection to server 2. Send EHLO 3. Read server response The PROXY injection causes a response from the server, but the response gets "cached" in the incoming TCP buffer. The injection script likely does not consume this buffer, resulting in Step 3 above reading this "cached" response. So from the point of view of smtplib.SMTP, the "503" message arrives _after_ EHLO is sent, while in actuality the "503" arrives before EHLO is sent. I suggest rewriting the port forwarding script so that it consumes the response from the server first before transferring to smtplib.SMTP ---------- nosy: +pepoluan _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com