On 04/03/2020 03:00, Geethapriya Liyanage wrote:
In SMTP communication, normally SMTP client sends commands and SMTP
server replies to that with reply codes. As in RFC 5321 , section
4.2.4, if the command is not recognized, code 500 should be returned.
My doubt is, if the SMTP server sends unrecognized command or code to
SMTP client , will the client also replies the same 500 code. if not,
how the SMTP client should handle it.
An SMTP server will never send a command to the SMTP client. That's just
not SMTP. In SMTP, the client sends commands, the server sends
responses, which all start with a three digit number where the first
digit is 1 to 5
A buggy SMTP server could send an invalid response to the SMTP client
(ie a response not starting with a three digit number beginning with 1
to 5). In that case, the SMTP client should do whatever it wants to do,
ranging from ignoring it, to dropping the connection in disgust and
reporting an error to the user/administrator/log/whatever (I'd probably
advocate for the latter).
--
Paul Smith Computer Services
Tel: 01484 855800
Vat No: GB 685 6987 53
Sign up for news & updates at http://www.pscs.co.uk/go/subscribe
_______________________________________________
ietf-smtp mailing list
ietf-smtp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/ietf-smtp