I need to implement support of multiple messages per one connection for my SMTP server.
Every message ends with:
data
<<content>>
.
And it’s logically that protocol state should be reset to “after receive authentication” point. Is it correct?
The question: Is it possible that any client sends message content with multiple data commands? Does the standard allow it?
From RFC2821 ("Simple Mail Transfer Protocol"):
i.e. after
<CRLF>.<CRLF>is received, the server consumes the mail data and clears its buffers; hence the client cannot then send more content associated with the message, since the server will have forgotten about the message.i.e.
MAILbegins a new mail transaction, and a successfulDATAcommand (terminated by<CRLF>.<CRLF>) concludes it; the client may then send another message.From RFC4954 ("SMTP Service Extension for Authentication"):
i.e. authentication takes place at most once per session, and applies until the end of that session.