Gnus development mailing list
 help / color / mirror / Atom feed
From: Bernard.Steiner@Germany.EU.net
Cc: Per Abrahamsen <abraham@dina.kvl.dk>,
	ding@ifi.uio.no, Bernard.Steiner@Germany.EU.net
Subject: Re: Gnus, movemail, POP3, trailing empty lines
Date: Tue, 04 Feb 1997 15:41:52 +0100	[thread overview]
Message-ID: <199702041441.PAA06465@qwerty.Germany.EU.net> (raw)
In-Reply-To: Your message of 04 Feb 1997 14:43:47 +0100. <vaf3evc1yb0.fsf@ls6.informatik.uni-dortmund.de>

     The POP3 server spits out a message at a time.  The last line of some
     messages is empty, or some others it is non-empty.  movemail concats
     all messages.  This results in a file that contains several messages,
     one after the other, and in some cases, a message begins with
     "\r\n\r\nFrom " (twice CRLF) whereas in other cases, a message begins
     with "\r\nFrom " (just one CRLF).  Gnus tries to read this file and
     does something strange when it sees the just-one-CRLF case.

Not exactly. You should be aware of the fact that all occourances (sp ?) of
"\r\n\r\nFrom " result from a non-initial mail in the mailbox, where the
preceding mail happens to contain a trailing empty line.
If you then interpret the empty trailing line (with the "\r\nFrom ") as a
separator, this may turn out OK. However, there's no reason why a mail should
contain a trailing empty line, and such a thing is certainly not required by
RFC 1939 (quoted below)

   Responses to certain commands are multi-line.  In these cases, which
   are clearly indicated below, after sending the first line of the
   response and a CRLF, any additional lines are sent, each terminated
   by a CRLF pair.  When all lines of the response have been sent, a
   final line is sent, consisting of a termination octet (decimal code
   046, ".") and a CRLF pair.

BTW the whole business about multiple mails with separators utterly fails
to produce recoverable results: Just consider PGP-signed mails that contain
an empty line, followed by a single "From " such as in

>From what I can see, this is a legal string iside a mail.

Now, you can say that your clever little mail-sorer will escape that to yield
a ">From " line, but then, the unpacking side will (correct me if I'm wrong)
never do a delete-one-greater-sign-from-a-string-matching-"^>>>*From ".
This is likely to produce checksum failures.
     
     I do not know whether a POP3 server should be required to tack on an
     extra CRLF to the end of each message, thereby ensuring the twice-CRLF
     case always, or whether movemail should tack on the extra CRLF, or
     whether Gnus should be taught to do without the extra CRLF.

     But somehow I think that the POP3 server is *not* the problem here.

Nope, it just is required to make sure there's a \r\n.\r\n sequence to signify
end of mail, where the CRLF pair before the dot belongs to the message.
See RFC 1939.

Bernard


  reply	other threads:[~1997-02-04 14:41 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-03 15:24 Kai Grossjohann
1997-02-03 16:36 ` Rich Pieri
1997-02-03 20:01   ` visigoth
1997-02-04  0:50     ` Lars Magne Ingebrigtsen
1997-02-04 12:05   ` Kai Grossjohann
1997-02-04 13:03     ` Bernard.Steiner
1997-02-04 13:10     ` Per Abrahamsen
1997-02-04 13:43       ` Kai Grossjohann
1997-02-04 14:41         ` Bernard.Steiner [this message]
1997-02-04 15:23         ` Rich Pieri
1997-02-04 15:31           ` Kai Grossjohann
1997-02-04 10:14 ` dave edmondson
1997-02-04 14:52   ` Rich Pieri
1997-02-05 22:40   ` Michael Huehne
1997-02-05 10:47 ` Kai Grossjohann
1997-02-08  9:25   ` Lars Magne Ingebrigtsen
1997-02-08 11:50     ` visigoth
1997-02-08 12:32       ` Per Abrahamsen
1997-02-08 16:08         ` Frank D. Cringle
1997-02-08 19:11           ` Steven L Baur
1997-02-09  2:58         ` Rich Pieri
1997-02-09  9:34           ` Per Abrahamsen
1997-02-09 14:56             ` Randal Schwartz
1997-02-09 15:32               ` mbox quoting (was: Re: Gnus, movemail, POP3, trailing empty lines) Per Abrahamsen
1997-02-10 14:52                 ` Rich Pieri
1997-02-10 15:30                   ` Per Abrahamsen
1997-02-10 15:45                   ` Lars Balker Rasmussen
1997-02-11  9:25                     ` Greg Stark
1997-02-11 11:36                       ` Per Abrahamsen
1997-02-11 12:52                         ` Lars Magne Ingebrigtsen
1997-02-11 13:44                           ` Per Abrahamsen
1997-02-11 18:43                           ` Sudish Joseph
1997-02-12  7:35                             ` Per Abrahamsen
1997-02-12 12:52                               ` Randal Schwartz
1997-02-12  8:47                             ` Lars Magne Ingebrigtsen
1997-02-11 12:57                         ` Randal Schwartz
1997-02-11 13:28                           ` Per Abrahamsen
1997-02-11 13:33                             ` Randal Schwartz
1997-02-11 14:16                               ` Per Abrahamsen
1997-02-11 16:13                                 ` Rich Pieri
1997-02-12  7:28                                   ` Per Abrahamsen
1997-02-11 15:00                               ` Rich Pieri
1997-02-09 16:19             ` Gnus, movemail, POP3, trailing empty lines Rich Pieri
1997-02-09 22:21               ` Mark Eichin
1997-02-10  4:44                 ` Lars Magne Ingebrigtsen
1997-02-10  4:45       ` Lars Magne Ingebrigtsen
1997-02-10  8:05         ` visigoth
1997-02-11 12:38           ` Lars Magne Ingebrigtsen
1997-02-03 23:48 St. Suika Fenderson Roberts
1997-02-04  1:59 ` Lars Magne Ingebrigtsen
1997-02-04  3:22   ` Jason L Tibbitts III

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=199702041441.PAA06465@qwerty.Germany.EU.net \
    --to=bernard.steiner@germany.eu.net \
    --cc=abraham@dina.kvl.dk \
    --cc=ding@ifi.uio.no \
    /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).