After a deep thought, the only way is to junk bytes and monitor for
CRLF, once it's received, "500 Line too long" returned.
Otherwise it brakes SMTP protocol as some guys noted me.
Hector Santos wrote:
Ivar Lumi wrote:
After fast look on RFC 5321, i don't see exact place what describes
how to handle "500 Line too long".
Must server junk bytes(if max line exceeded) and try to read CRLF,
after that returns "500 Line too long".
Must server send "500 Line too long" straight away.
Ivar, take a look at the actual transaction. I seem to recall this
being an erroneous response (by the some server, MS Exchange if I
recall?) related to NOOP.
I don't recall the details, but Google "NOOP Line too Long"
Here are few references: