Gnus development mailing list
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
Subject: Re: SMTP question (not quite Gnus-related)
Date: 08 Feb 2001 13:03:12 +1100	[thread overview]
Message-ID: <874ry6j5i7.fsf@inanna.rimspace.net> (raw)
In-Reply-To: <8766imnfa9.fsf@torus.tenzing.com> ("Steven E. Harris"'s message of "07 Feb 2001 17:18:22 -0800")

On 07 Feb 2001, Steven E. Harris wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
> 
>> Specifically, the explanation makes it possible to write a
>> stream-oriented SMTP `DATA' reader easily. To be strictly conforming,
>> you read bytes and scan for the sequence described. When you see it
>> and it alone, terminate the reading of the `DATA' command.
> 
> That's exactly what I've written - two of them, in fact. Each is based
> on a different state machine, depending upon differing interpretations
> of RFC821. My question still stands, though:
> 
>   What about an "empty" message?
> 
> Is this supposed to be okay?

It is fine by the fragment you posted. By my reading of it, anyway. 

> ,----
> | DATA<CRLF>
> | .<CRLF>
> `----

That final line is a period on an otherwise empty line, the defined
terminator. Remember that this is legal:

,----
| DATA<crlf>
| text<crlf>
| .<crlf>
`----

So, clearly the initial <crlf> does not need to *exclusively* signal the
end-of-text. As such, making it do double duty for opening and closing
the DATA command seems legal to me.

> If so, then where is the terminator for the "DATA" command string?
> That first <CRLF> either belongs to the "DATA" as a command
> terminator, or to the period as the start of the message
> terminator. It can't be both. 

I don't see any indication in the RFC that the <crlf> sequence at the
end-of-line cannot serve double duty as the start of the indicated octet
sequence for the end-of-data inticatior.

> Most MTAs accept it, though.
> 
> I'm now thinking that a completely empty message like the one above
> isn't a valid RFC822 message anyway, but it still seems like there's a
> hole in RFC821 on this.

*shrug*  I don't think so, you do. That makes it a hole. ;)

        Daniel

-- 
We must put aside the weapons of our minds, 
cross the no man's land come with empty hands. 
Overcome the fear to drop the last defense, 
speak forbidden words reach out beyond ourselves.
        -- Covenant, _Wall Of Sound_



  reply	other threads:[~2001-02-08  2:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-29 18:04 Steven E. Harris
2001-02-07 17:56 ` Kai Großjohann
2001-02-08  1:00   ` Daniel Pittman
2001-02-08  1:18     ` Steven E. Harris
2001-02-08  2:03       ` Daniel Pittman [this message]
2001-02-08 13:24         ` Kai Großjohann
2001-02-08 17:11           ` Steven E. Harris
2001-02-08 17:25             ` Paul Jarc
2001-02-08 17:30               ` Paul Jarc
2001-02-08 18:02               ` Steven E. Harris
2001-02-08 18:20                 ` Paul Jarc
2001-02-09 12:09                 ` Kai Großjohann
2001-02-09 17:33                   ` Steven E. Harris
2001-02-08 17:33             ` Kai Großjohann
2001-02-08 18:07               ` Steven E. Harris
2001-02-09 12:11                 ` Kai Großjohann
2001-02-09 17:26                   ` Steven E. Harris
2001-02-09  0:42           ` Daniel Pittman
2001-02-08 13:22     ` Kai Großjohann
2001-02-08 17:18       ` Steven E. Harris
2001-02-08 17:37         ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ry6j5i7.fsf@inanna.rimspace.net \
    --to=daniel@rimspace.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).