Subject: Re: Content-Length 'trimming'?

From: [email-masked] (Stephen R. van den Berg)
Date: Mon, 20 Feb 1995 21:41:30 +0100

Philip Guenther <[email-masked]> wrote:
>     If there is an existing Content-Length: field in the  header
>     of  the mail and the -Y flag is not specified, procmail will
>     trim the field to report the correct  size.   Procmail  does
>     not change the fieldwidth.

>Does it mean that if the incoming field has too small a value (i.e.,
>the message is 120 bytes long and the header says "Content-Length: 93"),
>that it will be left alone?  What is meant by "fieldwidth"?

No, then procmail will change it into:

Content-Length:120

The fieldwidth in this case is three (digits).

If the length of the mail is, say 4000, and it comes in with
"Content-Length: 93", then procmail will change this into:

Content-Length:999

and subsequently, procmail will start quoting/escaping all From_ lines it
finds after offset 999 in the body of the mail.

>I ask because I'd like to set a mailbox format at my site where "From "
>lines are escaped, but a correct Content-Length header exists.  This
>would provided for both techniques of splitting mailboxes without
>conflict.

If you have software that does not respect Content-Length, you're better
off by simply running procmail with "-Y".

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

"Well, if we're going to make a party of it, let's nibble Nobby's nuts!"