ietf-smtp
[Top] [All Lists]

Re: ambiguities in RFC 2821 regarding end of mail data

2003-06-20 14:37:01
On Fri, 20 Jun 2003 16:50:17 EDT, "Richard O. Hammer" 
<ROHammer(_at_)earthlink(_dot_)net>  said:

The first ambiguity concerns this question:  When I receive this 
sequence CRLF.CRLF, should the data which I capture include the first 
CRLF or not?

No.

But the RFC leaves room for confusion.  This phrase from section 3.3
might be interpreted both ways, "...the SMTP server ... considers all
succeeding lines up to but not including the end of mail data
indicator to be the message text."  What is "the end of mail data
indicator"?  Section 4.1.1.4 calls the whole CRLF.CRLF the "end of
mail data indication".

Right.  Nothing confusing there.

The second ambiguity relates to the first, and it concerns the 
question: When I receive a period alone in the first line of mail data 
should I consider that the end of the data?

Well... unless you're using SMTP to pass non 822/2822 mail, you're going
to be dropping it on the floor ANYHOW because if that's the end of the
data, there's not much to deliver (you need *at least* a CRLF pair to
mark the end-of-822 headers and start-of-body).

I believe that I should consider the sequence .CRLF to be the end of 
the data if those are the first three bytes received by the data 
parsing routine.

Unless you're doing non-822 mail, what you've received at that point is a
broken set of RFC822 headers consisting of the single octet '.'


Attachment: pgpViu2ryXXAn.pgp
Description: PGP signature