Subject: BUG: tenex format doesn't handle empty body. Pine 3.95

From: Andrej Borsenkow <[email-masked]>
Date: Fri, 26 Jul 1996 18:05:46 +0400 (MOW)

Hi!

I recently switched to tenex format. As it is not possible to save mail
between different format folders, I setup file ~/mail.txt on my IMAP host
to get INBOX in tenex format as well.

It all worked pretty well until I got message with empty body (it comes
among other things as delivery notification from file transfer program).
And it didn't work!!! Such a message appears as

      2                                    [ No Message Text Available ]

in index screen; if I try to read it, I get all headers shown as *message
body*. No flags etc are visible;  thanks God, I can at least delete it ;)

Note, that absolutely the same messages were treated just fine when being
in INBOX (default system mbox).

The situation is really bad. I don't like to return to mbox and I hence do
need mail.txt and I do need these empty messages.

Note, that contents of mbox *is* correct: headers + empty line. Here
*nothing* was changed. Tenex (mail.txt) is also correct, as far as I can
tell: tenex separator + headers *without empty line after*. 

Now, either IMAPd makes error when parsing such message or when moving it
form mbox - it doesn't matter for my sake.

I use Pine 3.95 and IMAPd which comes with Pine 3.95.

It is straightforward to reproduce:

1. create mail.txt in your home directory;
2. send itself a simple mail:

% sendmail -t your_user_name
From: foo
Subject: bar
^D
% 

3. and try to read it now.

Let me know if it suddenly works ;) (Don't send empty mail with Pine - it
comes as message with one empty line *in body* as opposed to null body).

greetings

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: [email-masked]
-------------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 29 Jul 1996 15:39:14 -0700 (PDT)

Thank you for reporting this problem.

Technically, it is a software bug to write a message without the blank line at
the end of the header.  The blank line is part of the header, and should be
included even if the text body is empty.  As you observed, in some formats,
this was treated as an empty header and all of the text in the text body
instead of as a header with no text body.

Although the real bug is in the delivery agent which wrote the message, we
agree that the current behavior is not very useful.  This is changed in
today's version of the imap-4 toolkit, and thus the problem will be fixed in
Pine 4.0.

You can fix your IMAP access to tenex mailboxes now, by installing the IMAP
server from
	ftp://ftp.cac.washington.edu/mail/imap.tar.Z
You'll have to wait until Pine 4.0 to get the fix for local file access.

---

From: Andrej Borsenkow <[email-masked]>
Date: Tue, 30 Jul 1996 16:49:07 +0400 (MOW)

On Mon, 29 Jul 1996, Mark Crispin wrote:

> included even if the text body is empty.  
>

RFC822:

message     =  fields *( CRLF *text )
 
If I get it right, it means, that CRLF after headers is part of *body*.
And optional as well.

Marc -
   sorry; we had mail server problems, and I have seen this one
   too late. Forget my question about IMAP-4

greetings

---

From: Andrej Borsenkow <[email-masked]>
Date: Wed, 31 Jul 1996 10:08:54 +0400 (MOW)

> You'll have to wait until Pine 4.0 to get the fix for local file access.

I installed IMAP4 and the problem with empty messages is gone. But it
introduced another one:

now after message was moved form INBOX into $HOME/mail.txt (on IMAPd
host), it is flagged as `SEEN'. Thus, I get no indication which message is
new one. 

The message in mail.txt is flagged as 021; I have no idea what 020 means -
it is not described in pine tech-notes :(

I find this problem to be more annoying as previous and appreciate
any hint about either how to (re-)configure IMAPd or how to patch it. 

The IMAPd version (as reported when telnet'ting on port 143):

* OK itsmx1 IMAP4 Service 8.3(143) at Wed, 31 Jul 1996 10:05:22 +0400
(MOW) (Report problems in this server to [email-masked])

(done as requested ;))

BTW I *really* would apreciate a patch; 1MB once more seems to be overkill
for what should be a couple of lines worth.

thanks in advance