deliver is correct in reporting the error. The 'From pilsl....' line with no colon after the From is how the beginning of a new message is marked in an mbox file. It is not a correct rfc822 header, and as the first line in the message, it is not a valid rfc822 message.
Peter Pilsl wrote: >this is an old problem I run into several times and found also plenty >of postings at googles, but this time I really want to know, who the >evil is ;) > >If I get a mail and pass it through procmail/formail to add an x-loop-header >and then pass to deliver, deliver fails with an error: "Message >contains invalid header" > >The reason is that formail (and not procmail !) - that always tries to >fix the mail to be standardconform - adds one From-line at the >beginning of the mail in a format deliver doesnt seem to like: > >example: cat /tmp/mail | formail -a"X-Loop3: "server.goldfisch.at" > >the input: >Return-Path: <[EMAIL PROTECTED]> >Received: from server2.local (localhost.localdomain [127.0.0.1])\\ > by server2.local (8.12.1/8.12.1) with ESMTP id fATL5vOx015215 >... > >becomes to: > >From [EMAIL PROTECTED] Mon Dec 3 01:29:04 2001 >Return-Path: <[EMAIL PROTECTED]> >Received: from server2.local (localhost.localdomain [127.0.0.1])\\ > by server2.local (8.12.1/8.12.1) with ESMTP id fATL5vOx015215 >... > > >While this is no current problem, cause I can use the -f switch of >formail to prevent it from doing so or use the tail-command to remove >this line again, I am worried about it, cause maybe one day a mail >will pass by with the same format formails wants to make and deliver >will fail ... > >who is wrong in this case ? formail or deliver ? > >thnx, >peter > >ps: the proper solution at the moment will be to let formail add this >suspicious first line in any case and remove it with tail later. While >this is some unwanted overhead one should be on the save side doing so >