Subject: Re: SUN and the Content-Length header field

From: Bill Yeager <[email-masked]>
Date: Wed, 22 Mar 1995 14:53:27 -0800 (PST)

Well, I wrote a solaris driver that takes care of content-length. Too bad
it is not always right, ie, the content length is sometimes wrong. This
leads to lots of difficulties in the parse, and occasionally a spit message
if the client sending the message is not self defensive.

This is because V3 Sun Attachments generated by MailTool 
forward the ENTIRE message including the hidden from line when 
someone forwards a message. This is really a bug that will never
be fixed. Me, I will INTENTIONALLY "From stuff" when sending a
message in Sun Attachment format because quote-printable is not
recognized in this format. Otherwise, one can replace those
"From "'s in col. 1 with "=46rom " and suitably set the content encoding.

A better idea is just to configure sendmail to "From stuff." 

This is a can of worms. You can believe me!

Bill

---

From: Tomas Kullman <[email-masked]>
Date: Fri, 24 Mar 1995 10:02:38 +0100

> if the client sending the message is not self defensive.

Bill, is this driver available to be accuired by the customer to solve his
problem (even if only temporarily since SUN have to deal with this sooner or
later)? There are strong requirements to be able to coexist and share mailboxes
with SUN Mailtool.

Bill, have you a clue when and why content-length get corrupted? If it's
generated at delivery it seems to be created in a controlled environment and
should be concistent. I haven't seen any complains of corrupted mailboxes in
the SUN related newsgroups.

> be fixed. Me, I will INTENTIONALLY "From stuff" when sending a

Yeah, I had a feeling this was introduced with Solaris2. Too bad.

> This is a can of worms. You can believe me!

Well, I _do_ believe you! The sad thing is that customers tend to blame the
third party vendors, not the platform providers causing the problem by lousy
implementations.

-- Tomas

---

From: Bill Yeager <[email-masked]>
Date: Fri, 24 Mar 1995 09:13:38 -0800 (PST)

>  later)? There are strong requirements to be able to coexist and share

There are plans to make this imapd available. The intent of the imapd was
interoperability between SUN MailTool and imap based clients such as the
one we are working on now, and that I am using. IT is called Roam and it
too will be made available. Roam also permits disconnected mail management.

These two tools allow sun v3 attachments and MIME to cooexist in the same
mailbox. This is accomplished by translating V3 format to MIME, and the user
has the option to keep the translation or discard it. 

>  the SUN related newsgroups.

We just ran some tests yesterday here to check this out. /bin/mail does recompute
the content length EVEN IF the MUA includes a content length, and this latter 
content length is correct. This has been true since solaris 2.1.

What we were seeing was errors in Content-Length when attachments under V3
Sun attachments were from stuffed. As you might recall, these attachments
ALSO have content lengths, and these internal lengths were NOT corrected,
and at the same time the total content length was wrong. 

The BUG here is enabling from stuffing when V3 attachments are used. The problem
may be unique to Sun, I don't know, because there are people who still use
sunos 4.x mail tools and NFS mount solaris 2.4 /var/mail/ to read their mail.
So, if there is NO from stuffing, then things won't work for them. Pretty
stupid from my point of view but I have to live with it. So, for v3 attachments
our roam from stuffs sun attachments before computing the content length
of each attachment.

We can discuss this more offline if you wish, and I can give you more info
about what is available and maybe when.

>  I haven't seen any complains of corrupted mailboxes in

We can also discuss why this is true offline. 

I only close by saying there was an article Computer World or some such about
two weeks ago announcing a new Mission Critical Mail program at SunSoft. This
project is well underway and is addressing all of these issues and many more.
As mentioned there, Roam will be used as a client. This is the project I am now 
working on. SUN is very serious about solving the email problem.

Bill

---

From: Bill Yeager <[email-masked]>
Date: Fri, 24 Mar 1995 09:21:23 -0800 (PST)

>  Well, large mailboxes in berkeley format isn't that blindingly fast either.
>  I thought content-length was invented to overcome this by allowing to skip
>  large messages without a need to parse through it all.

This is in fact true. Content-Length is there for two reasons. 

	1) One need not ">From " in a message body.
	2) One can skip over the message body.

Of course, one still needs to find the content-length header, but the processing time
is in the noise. 

So, the solaris imapd does take advantage of content-length to skip message bodies. 
As Mark will probably point out, there is a better approach provided by TENEX 
box format. Too bad that Content-Length is not the first header. Then one could skip
the entire message. 

The real problem is flat file message spaces. Cyrus solves this and any intelligent
solution to the mail problem should address it.

Bill