OK, this should settle the matter of which part to filter, though I think
it's more work for procmail to measure every message than to use a blanket
rule that is occasionally the poorer choice:
:0
* conditions for adding text at the top of the body
{
:0
* 1^1 H ?? >1
* -1^1 B ?? >1
{ portion=b line=1 command=i } # head is larger than body
:0E # head is smaller than body or they are of equal size
{ portion=h line=$ command=a }
:0fw$portion
| sed "$line$command\\
text to add with\\
variables to expand\\
\\
"
}