On Tue, Aug 10, 2021 at 10:50:56AM -0400, Wietse Venema wrote: > A reasonable person would agree that the parameter syntax of an > unimplemented command cannot be validated.
FWIW, the pedantically standards-compliant response to an unknown SMTP command is in fact 500, rather than 502: https://datatracker.ietf.org/doc/html/rfc5321#section-4.2.4 The 502 response is reserved for known, but not implemented or not enabled SMTP commands. So IMHO the patch below is technically correct, but far from important. --- a/src/smtpd/smtpd.c +++ b/src/smtpd/smtpd.c @@ -5730,7 +5730,7 @@ static void smtpd_proto(SMTPD_STATE *state) && (err = check_milter_reply(state, err)) != 0) { smtpd_chat_reply(state, "%s", err); } else - smtpd_chat_reply(state, "502 5.5.2 Error: command not recognized"); + smtpd_chat_reply(state, "500 5.5.2 Error: command not recognized"); state->error_mask |= MAIL_ERROR_PROTOCOL; state->error_count++; continue; -- Viktor.