Louis continued,
| At this point, I have narrowed it down to formail, which is what my
| procmail recipe uses to add the new header. It looks like formail is
| trying to change the format of the message (can't really blame it
| since that is one of formails primary functions). I just need to find
| a way to count those lines and add the header without changing the
| format, because deliver needs to get it in the same format sent out by
| sendmail.
If you're using formail's -f option, it shouldn't be changing the format.
Otherwise it will make sure that there are a postmark line at the beginning
and a blank line at the end; if you are filtering only the head, a blank
line is already at the end of formail's input anyway. Also, you'll need
the `r' flag on the colon line of the recipe that delivers the message to a
file or a pipe to keep procmail from doing those same things.
Another way is not to use formail for it:
:0hBfwr
* H ?? ! ^Lines:
* 1^1 ^.*$
* -1^0 ($)($)^^
| sed "$ i\\
Lines: $=\\
"
Some versions of sed may need it written this way:
| sed "$ i\\
Lines: $="
However, the first version should be harmless where it isn't needed.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail