procmail
[Top] [All Lists]

Re: insert one line at the top of incoming message

1998-03-28 01:29:29
"David" == David W Tamkin <dattier(_at_)wwa(_dot_)com> writes:

    David> Michael Powe wrote of Ken Hooper's quote to Timothy Luoma
    David> of my suggestion to Ken,

    David> | This puts the message at the end of the file.

    David> At the end, yes, but not at the end of the file: at the end
    David> of the INPUT.  Since the input is the head of the message,
    David> and the added text goes after the blank line at the neck,
    David> it will be at the top of the body when the `hf' recipe is
    David> done and procmail reattaches the unfiltered body.

Yes, I made a number of blunders there ... not the least of which was
to not RTFM, in this case, Jari's pm-tips:

--------------------------------------------------
12.7 How to add text to the beginning of message

            :0 fh
            | cat - ; echo "This text comes after the body"
--------------------------------------------------

Which, in fact, adds the echoed line to the beginning of the body of
the message.  Despite its wording.  ;-)  Then, just inserting the
appropriate text & $MATCH does what was asked.

Doh!  Still living and learning,

mp

                Michael Powe       looie(_at_)teleport(_dot_)com
                 pgpk -a finger://teleport.com/looie
  Portland, Oregon, USA   "Home of the Summer Wiener Dog Nationals"


"It is undesirable to believe a proposition when there is no ground
whatever for supposing it true."
-- Bertrand Russell