Noel J. Bergman wrote:
Richard,

I am looking over the submission with an eye towards incorporating it.  The
only question I have is what to do in the event of invalid input.  You seem
to basically ignoring the error can keeping the data.  I'm thinking that
perhaps there ought to be an exception tossed that the handler can use to
report the invalid input (501 error).

Thoughts?


As I read section 2.3.7 of RFC 2821, it does not say what we (who are writing an SMTP receiver) are supposed to do upon receipt of a loner (a term I will use for a CR or LF which is not part of a CRLF pair).

It does say SMTP senders are not supposed to send loners, which, as far as James is concerned, seems to lay primary responsibility for this conformance upon javax.mail.Transport which I believe James uses. But secondarily, I suppose, James could and perhaps should assure that the email addresses and message data which it hands to Transport contain no loners.

But I believe we are now talking about using this class for reading only the envelope. The reading of message data is handled by a different derivative of the Socket InputStream.

So the question to be decided, upon receipt of a loner, may be whether we 501, silently remove it, or leave it in. If we leave it in I expect it would generate an error later as we parse the envelope, but in some cases of local delivery I guess it might pass through harmlessly (though I can't think of how). The choice to 501 seems a little aggressive, but it could be a sensible and good choice. Whoever sends us a loner is breaking a rule, but the RFC does not appoint us as policeman either.

If we change this I'll need to redraw my finite state machine (circles and arrows labeled with characters) and change some of the code.

Rich


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to