izomiac <izom...@zrwb3.r-66y.com> added the comment:

I agree, it's my suspicion that the server's error message and python's 
outbound command are sent so close to each other that buffering ensures they 
disagree about the exact sequence of commands/responses.

As for my server, it was HAProxy doing the injection and I rewrote the server 
to both ignore PROXY commands and to listen on multiple ports so a proxy is not 
necessary. 

So this issue no longer exists for me, but I know that I'm not the only one who 
uses HAProxy to forward SMTP requests (residential ISPs block port 25), and 
Python was relatively unique in its intolerance of this behavior.  (Python uses 
lower case commands, which are easy to recognize on server logs to determine 
which clients are using it.)  It's certainly not a critical issue affecting 
thousands, but in my experience glitchy behavior is a good indicator that the 
code is buggy in general.  Plus, buffering errors scare me because there are so 
many potential security exploits associated with them (on top of being a pain 
to debug.)  But, yeah, this is more of a courtesy bug to let you know about a 
tricky glitch I encountered.

----------

_______________________________________
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

Reply via email to