procmail
[Top] [All Lists]

when are head and body separated?

1997-02-22 19:10:44
This is puzzling.

I had a recipe that filtered the heads of messages that it worked on; among
other things, it removed the trailing empty line at the neck.  That was a bad
idea, because if the first line of the body was indented or fit the form of
a header line, it would get agglutinated to the head, and this is one of
those times when we don't want that to happen.  So in those cases I should
have expected it to cause problems.

However, if the first line of the body is ordinary text, beginning flush
left and having a space somewhere before the first colon or no colon at all,
that shouldn't happen, I thought.  Yet even with text like that, the next
head filtering recipe was treating what had been the first paragraph of the
incoming body as part of the head.

Isn't procmail supposed to make sure that there is an empty line just before
the first line of the message that isn't legally part of the head and insert
one if it is missing?  (No, I was not using the `r' flag for raw mode.) 
Right after finishing the first filter, shouldn't procmail have reinserted
the missing empty line back where it belonged?  I had originally not been
careful about it simply because I expected procmail to restore the empty
line; that was wrong in any case, because it wouldn't work properly when the
body began with an indented line or with a line that looked like a legitimate
header, so I had to correct it anyway, but I'm surprised that it didn't work
in other situations.

Later on formail was catching the problem and restoring the separation ... or
I guess it was one of the formail calls; SOMETHING was putting things back to
rights after only that second filter was treating the first paragraph of the
body, regardless of its contents, as part of the head.

So is procmail (version 3.11pre4) supposed to take care of that or not?

<Prev in Thread] Current Thread [Next in Thread>