From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9800 Path: main.gmane.org!not-for-mail From: Bernard.Steiner@Germany.EU.net Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus, movemail, POP3, trailing empty lines Date: Tue, 04 Feb 1997 15:41:52 +0100 Sender: Bernard.Steiner@Germany.EU.net Message-ID: <199702041441.PAA06465@qwerty.Germany.EU.net> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035149770 20631 80.91.224.250 (20 Oct 2002 21:36:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:36:10 +0000 (UTC) Cc: Per Abrahamsen , ding@ifi.uio.no, Bernard.Steiner@Germany.EU.net Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id HAA12166 for ; Tue, 4 Feb 1997 07:04:17 -0800 Original-Received: from mail.Germany.EU.net (mail.germany.eu.net [192.76.144.65]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Tue, 4 Feb 1997 15:42:01 +0100 Original-Received: by mail.Germany.EU.net with ESMTP (5.59+:34/EUnetD-2.6.1.h) via EUnet id PAA17398; Tue, 4 Feb 1997 15:41:57 +0100 Original-Received: from localhost.germany.eu.net by qwerty.Germany.EU.net with SMTP (8.6.4/EUnetDlan-1.23-1.2.10) via EUnet id PAA06465; Tue, 4 Feb 1997 15:41:56 +0100 Original-To: Kai Grossjohann In-reply-to: Your message of 04 Feb 1997 14:43:47 +0100. Xref: main.gmane.org gmane.emacs.gnus.general:9800 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9800 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