procmail
[Top] [All Lists]

Re: Procmail-recipe problem!

1998-02-25 00:44:22
On Tue, 24 Feb 1998 13:45:25 -0600 (CST),
dattier(_at_)wwa(_dot_)com (David W. Tamkin) wrote:
| >    :0hfi
| >    | true
| >    :0fhw # `h' now refers to second set of headers
| >    | formail
| Well, what about leaving it in if it was there in the first place?
|     :0fh
|     | grep '^From[ ]'
All that will do is remove lines from whatever is the current header unless
they begin "From ".

Right. But then you say,

We can keep a From_ that is already there ... though I doubt that it would
be, since it arrived as part of the body, and thus it would be escaped unless
it had been protected by Content-Length:.  But I think it's better for

My intention was to keep the existing From_ line in the +headers+ but
otherwise remove headers plus neck, attaching the From_ line to
whatever new headers the body contained. As far as I could test it,
this did it. The sed script I cooked up (based on yours, excellent as
usual) also seemed to accomplish this, with the added benefit of being
able to cope with empty lines at the start of the body. (I'm not sure
I'd want to be able to cope with that, though; I'd probably regard it
as a syntax error.)

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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