for imap/smtp syntax errors, only echo the remaining buffer if the connection is authenticated

This commit is contained in:
Mechiel Lukkien
2023-03-10 11:32:34 +01:00
parent e413c906b1
commit f9eae88aba
6 changed files with 55 additions and 18 deletions

View File

@ -669,7 +669,7 @@ func command(c *conn) {
var serr smtpError
if errors.As(err, &serr) {
c.writecodeline(serr.code, serr.secode, fmt.Sprintf("%s (%s)", serr.err, mox.ReceivedID(c.cid)), serr.err)
c.writecodeline(serr.code, serr.secode, fmt.Sprintf("%s (%s)", serr.errmsg, mox.ReceivedID(c.cid)), serr.err)
if serr.printStack {
debug.PrintStack()
}