Subject: [Unix Pine 3.91] save: "Unable to append mail to file"

From: [email-masked] (Kenneth Manheimer)
Date: 10 Aug 1995 14:00:40 -0400

Howdy.

I use pine for previewing and quick-handling of my email deluge, and a
more automatable email interface (emacs vm) for systematic foldering,
folder perusal, etc.  (Work dynamics as they are, i wind up using pine
predominantly.)  My problem is that pine more-than-occasionally
rejects vm folders for saves.

Now, vm is supposed to be rfc822 compliaint, but even if it's not
perfectly so, i wish pine would let me append rfc822-formed messages
in a file when i wish to do so!  (I realize that i can use 'export',
but it loses information.  And besides, it doesn't do completion - i
hope that's being corrected in the next release! - which makes the
foldering process much more clunky...)  So i request relaxation of the
constraints on folder type for saves - require existence of the
folder, and some basic mail-folder characteristics requirements, but
don't be so stringent that mail-like folders are rejected.

And btw, any word about when some patches and/or a new version might
appear?  I took a quick look at the code, but couldn't even locate
significant portions of the "Unable to append mail to file" message,
to find the relevant code to make the change myself.  (And what i
could track down did not look trivial...)

ken
[email-masked], 301 975-3539

---

From: Mark Crispin <[email-masked]>
Date: Thu, 10 Aug 1995 17:02:58 -0700

That error message indicates that you attempted to append a message to a
file that is not in any recognized mail box file format.  The format of
mail box files is not specified by any RFC, and more likely than not emacs
vm has its own ideosyncratic format that is not known to Pine.

Since Pine does not know what format the mail box file is in, it does not
know what format in which to write the message.

You would probably be very upset if Pine were to write a message to an
executable binary file, or to a shell script, because you mistyped a name.
You'd also be upset if Pine were to write a message to a vm mail box file
using some other mail box format (meaning that vm wouldn't recognize it as
a message).

I hope that you now recognize that a "relaxation of the constrains of
folder type for saves" is not what you want.

If you want to write to an arbitrary file, the command to use is Export;
if you want to write to vm folders, you either need to tell vm to use the
standard Unix mail box format or you need to write a c-client driver to
support the vm format.  A typical c-client driver is
	pine3.91/imap/ANSI/c-client/bezerk.[ch]
You basically need to copy this code, change all occurances of the string
"bezerk" to "vm", then change the code to read/write vm format instead of
Unix format.  Not for the faint-hearted.

> [email-masked], 301 975-3539

-- Mark --

DoD #0105, R90/6 pilot, FAX: (206) 685-4045  ICBM: N 47 39'35" W 122 18'39"
Science does not emerge from voting, party politics, or public debate.

---

From: Ken Manheimer <[email-masked]>
Date: Sun, 13 Aug 1995 14:18:51 -0400

> I (ken) had written:

> vm has its own ideosyncratic format that is not known to Pine.

No, as i tried to say, pine accepts the majority of folder i create using 
pine.  However, it does not accept a few, and those few totally disrupt 
my efforts to do my "foldering" from pine.  Morever, those few that it 
rejects are readable using, eg, Unix mail, and maybe even Pine itself!

> using some other mail box format (meaning that vm wouldn't recognize it as

I realized that, which is why i was asking for relaxation, and not 
elimination, of the constraints!  If you like, i can try to create, and 
post, a small mail folder which pine rejects for foldering, but which, eg 
unix mail *and* pine accept for reading as mail folders.

> folder type for saves" is not what you want.

Rather, i think you misapprehended what i was requesting!  I was aware of 
the usefulness of rejecting unrelated folders!

> > foldering process much more clunky...)  So i request relaxation of the

(Also, i mentioned that i was curious about the prospects for another 
release - any word on that?)

ken

---

From: David L Miller <[email-masked]>
Date: Mon, 14 Aug 1995 13:26:29 -0700 (PDT)

On Sun, 13 Aug 1995, Ken Manheimer wrote:

> Date: Sun, 13 Aug 1995 14:18:51 -0400
> From: Ken Manheimer <[email-masked]>
> To: [email-masked]

> Subject: Re: [Unix Pine 3.91] save: "Unable to append mail to file"
>
>

That would be very helpful.  Please send it as an attachment so we are
sure to see the right bits ;)

> release - any word on that?)

Pine 3.92 is coming, but we don't have a timetable for it yet...

--DLM

|\ |  |\/|  David L. Miller    [email-masked]  (206) 685-6240
|/ |_ |  |  Software Engineer, Pine Development Team   (206) 685-4045 (FAX)
University of Washington, Networks & Distributed Computing, JE-20
4545 15th Ave NE, Seattle WA 98105, USA

---

From: Ken Manheimer <[email-masked]>
Date: Mon, 14 Aug 1995 17:57:22 -0400 (EDT)

> sure to see the right bits ;)

Thanks.  I've tracked the offending format down - pine requires the date
number on the first line of the file to occupy two spaces, even when it's
a single digit date.  (Most mail folder-ers pad the date with a space, but
one that i used at least in 1992 did not, causing my problem.) The
attachment contains an example of this.  SunOS 4 bin/mail and ucb/mail,
and SunOS 5 mailx, all accept it without blinking. 

I do recommend relaxing the pine mailbox criterion, to at least allow this
variance, and even more.  Personally, i expect that just requiring a
leading "From " at the very beginning of the file would be sufficient to
weed out the non-mail files, particularly if there actually is no formal
standard for unix-mail format files - i suspect that's a commonly used
criterion. 

> Pine 3.92 is coming, but we don't have a timetable for it yet...

Cool.  (I presume the export command will be getting completion, and i'd 
also like to suggest having the expunge-confirmation come *before* the 
quit confirmation, when exiting with `no-quit-without-confirm' set.)

Thanks for taking a look at this.

ken

From [email-masked] Fri Dec 2 13:24:24 1994
From: Me <[email-masked]>
To: [email-masked]
Subject: Re: [Unix Pine 3.91] save: "Unable to append mail to file"
Date: Fri, 2 Dec 94 13:24:24

Pine does not accept single-digit date numbers on the initial mailbox
'From ' line, while, eg, Unix mail does.

ken

---

From: Mark Crispin <[email-masked]>
Date: Mon, 14 Aug 1995 18:10:23 -0700

> rejects are readable using, eg, Unix mail, and maybe even Pine itself!

Let me try again.

Internally, Pine has a series of tests in which it classifies files by
what format they are.  Once the file has been classified by type,
operations performed on the file are handled by specific code (called
"drivers") for each type.

For example, there is a "get message header by message number" function,
which is different for each type.  One of the functions is "append
additional message to this file".

That error message is generated when you call the "append" function for a
file of type "arbitrary text".

You can do certain other things with a file of type "arbitrary text".  You
can open it in Pine, in which case it will appear as a single message with
a pseudo-header containing the file author and create date for its "From"
and "Date" headers.  But you can not append to such files.

> If you like, i can try to create, and

Please do.  I will be happy to analyze it.  But please be sure that you
are actually reading it as a mail box file, and not as an arbitrary file.

-- Mark --

---

From: Ken Manheimer <[email-masked]>
Date: Tue, 15 Aug 1995 10:49:37 -0400

> > pine.  However, it does not accept a few, and those few totally disrupt

Darn.  That was supposed to be, "... pine accepts the majority of folders
i create using *vm*."  The point is that there is some small discrepancy in 
some otherwise mbox-conforming folders which other mail browsers accept, 
both for foldering and browsing, but which pine rejects.

> Let me try again.
> 
> [More elaborate explanation of why it is proper for pine to reject non-
>  mbox "arbitrary text" files.]

I have been trying to say that i don't mean to suggest accepting arbitrary
text files!  Rather, there is some minor discrepancy in some folders which
causes pine to reject it. 

> are actually reading it as a mail box file, and not as an arbitrary file.

As it happens, David Miller <[email-masked]> also responded,
asking for the sample, and in tracking down a valid, minimalist sample i
identified the problem.  Pine requires the date number on the first line
of the file to occupy two spaces, even when it's a single digit date. 
(Most mail folder-ers pad the date with a space, but one that i used, at
least in 1992, which is the date of an offending message i found, did not,
causing my problem.)

The attachment contains an example of this, as a single-entry mbox file.
SunOS 4 bin/mail and ucb/mail, and SunOS 5 mailx (and vm), all accept it
as an mbox-format file (displaying the sender and subject in the header 
summary, etc) without hesitation.  Add a space before the date number, 
and pine then accepts it as an mbox, also.

I think it would be sufficient and proper to impose a weaker criterion for
distinguishing mbox-format files, though i guess you have to consider the
other contingencies for the file-type "driver".

Ideally, however, i think having "From "  as the first characters in the
file would be sufficient.  You're probably just as likely to encounter a
false positive from a file that has an excerpt of the first line from a
valid mbox file as you are to encounter a non-mbox file that happens to
start with "From ".  You could always add the constraint that the last
non-blank character of the first line be a digit, and eliminate almost all
of the latter type of false positives, and still not exclude mbox files
produced by slightly aberrant mail folder-ers... 

ken

From [email-masked] Fri Dec 2 13:24:24 1999
From: Me <[email-masked]>
To: [email-masked]
Subject: Re: [Unix Pine 3.91] save: "Unable to append mail to file"
Date: Fri, 2 Dec 99 13:24:24

ken