Denny Schierz:
> hi,
>
> I've attached a patch for smtpd.c (lates source) for change the line:
>
> "221 2.7.0 Error: I can break rules, too. Goodbye."
>
> with:
>
> "221 2.7.0 Error: Sorry, your input wasn't RFC5321 valid. Closing connection."
>
> The background is, that in most cases only a tester sees this
> messaged and it is much more nicer, to say him or her, that the
> command wasn't the correct one (for example, wrong order). In most
> cases, it happens, if you just want to test, if everything works
> as expected, using telnet etc.
>
> I hope, the patch is ok.
This reply is not for humans. It targets ratware that that sends
forbidden commands such as CONNECT or POST, or that sends message
headers before Postfix has accepted a DATA command. People who
test SMTP by hand must know what is correct SMTP and what is not,
otherwise their test is invalid.
The reply itself violates the protocol in multiple ways. First, 221
is not a valid error response. Second, hanging up spontaneously
requires sending 421, not 221. Therefore the text of the reply must
not be changed.
Wietse