Subject: c-client cannot parse dtmail forwarded messages?

From: Karsten Ballueder <[email-masked]>
Date: Wed, 17 May 2000 10:45:10 +0100 (GMT)

I just had a report from a Mahogany user who has problems with messages
forwarded using Sun's dtmail program. Mahogany uses c-client 4.7a and I just
verified it.

What happens is, that the forwarded message appears as two messages in the
folder rather than just one.

I've included a (very small) folder file with such a forwarded message. If you
open it, you will see that c-client parses it as two separate messages.

Is this a c-client bug or is dtmail buggy?
>From MAILER-DAEMON Wed May 17 10:31:35 2000
Date: 17 May 2000 10:31:35 +0100
From: Mail System Internal Data <[email-masked]>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <[email-masked]>
X-IMAP: 0956744931 0000000935
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

From fbarr Wed May 17 10:04:56 2000
Date: Wed, 17 May 2000 10:04:56 +0100 (WET DST)
From: Francois barriere  <fbarr>
Reply-to: Francois barriere  <fbarr>
Subject: Test message
To: fbarriere
Content-MD5: 7SWs7kOqBoDQZHGTuRB1pA==
Content-Length: 395
Status: RO

------------- Begin Forwarded Message -------------

From fbarr Wed May 17 10:04:44 2000
Date: Wed, 17 May 2000 10:04:44 +0100 (WET DST)
From: Francois barriere  <fbarr>
To: fbarriere
Subject: Test message
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-MD5: FpcGNCFJvZ7r/uOvsfeyMg==
Status: RO
X-Status: 
X-Keywords:                 
X-UID: 935

Hello,

here is a message to forward.

Francois.
------------- End Forwarded Message -------------

--
 Karsten Ballüder  http://Ballueder.home.dhs.org/  mailto:[email-masked]
 Physics Department, Heriot-Watt University, Edinburgh, EH14 4AS, Scotland
                     Tel. +44-(0)-131-4513068  Fax. +44-(0)-131-4513136
            "In a world without fences, who needs Gates?"

---

From: Mike Trank <[email-masked]>
Date: Wed, 17 May 2000 06:34:17 -0600 (CST)

> Is this a c-client bug or is dtmail buggy?

in the "forwarded message" it looks like they are including the very first
"From fbarr ......" line that will always indicate a new message in the
mbox format, whe  preceeded by a blank line.

Seems to me that this would occur with any MUA. Try opening the folder
with /bin/mail and I think the same thing will happen.

I think that the "dtmail" thing should be careful not to put in the
line with "From" without the colon ":".

---

From: [email-masked] (Mike Macgirvin)
Date: Wed, 17 May 2000 10:39:34 -0700

Solaris has for several years now allowed embedded "From " lines in
messages by adding a "Content-Length:" header so that one knows the
exact length of the message. C-client uses "From " lines to break out
messages and doesn't rely on Content-Length; as it is not generally
standardized on Unix systems. Prior to the "Content-Length"
introduction, MDA's would from-stuff messages, turning embedded lines
beginning with "From " into ">From ". 

To make this work, you either need to figure out how to turn on
from-stuffing on your delivery system or make c-client recognize
"Content-Length" on the unix mailbox driver. It's probably eaiser to do
the former, since I believe it's built in as a sendmail config switch
(F=E applied on the local delivery mailer flags). 

It's been a while since I messed with this stuff so there may be a more
up-to-date solution, but this should point you in the right direction. 

Karsten Ballueder wrote:
>   ------------------------------------------------------------------------
> Received: (from fbarr@localhost)
>         by maui.atmel.fr (8.8.8+Sun/8.8.8) id KAA14169
>         for fbarriere; Wed, 17 May 2000 10:04:56 +0100 (WET DST)
> Message-Id: <[email-masked]>
> Content-Type: application/octet-stream
> X-UID: 934
>   ------------------------------------------------------------------------
> 
> --

---

From: Mark Crispin <[email-masked]>
Date: Wed, 17 May 2000 11:16:50 -0700 (PDT)

Unfortunately, the Content-Length header has design flaws (to say the least!)
that render it one of the worst ideas ever inflicted in email.  Hopefully,
there aren't too many people left who are still deluded into thinking that
Content-Length is reasonable; so I won't go into the long "why Content-Length
is hardful" lecture...  ;-)

As Mike observes, the correct thing to do is to "from-stuff"; that is, insert
a ">" prefix to lines that look like the internal "From " line, *NOT* "all
lines that start with "From ".  For sendmail, it's the F=E local delivery
mailer flag.

dtmail is also being unreasonable by including an internal format line in a
forwarded message.  Presumably, this is a vestige of UUCP thinking, since the
alternative explanation involves a contempt of Internet standards, and we all
know that SUN would never do such a thing, right?  ;-)  ;-)