procmail
[Top] [All Lists]

Re: Separate pipes for header and body?

1998-05-19 03:38:07
Martin Schulze wrote:

On Tue, May 19, 1998 at 11:36:27AM +0200, Dirk Laurie wrote:
How does one write a recipe that does one thing to the mail header
and another to the body?

:0 fhw
|pipe-for-header

:0 fbw
| pipe-for-body

Thanks for the help, but it won't quite do what I need.  This solution
makes two separate recipes.  Perhaps I should state my actual problem
instead of trying to make it abstract.

I get a lot of in-house mail created on a system (let's call it MSW) that
I myself don't like and don't use, so I make my ID on MSW (which I never
log into) forward all messages to my workstation.  Among the many demerits
of MSW are: the original message is enclosed in a wrapper that makes the
message look as if I sent it from that system; I get a full list of all
100 other recipients on the "To:" line; the contents may be a UUencoded
binary of one MSW's own, eccentric, incompatible word-processing files.

I wish to edit the header so the original sender is restored and the
long list of recipients is removed, and join it to the body if that
body is readable, and then put it in some mail folder.  If the body 
is one of those binaries, I wish to save the body only under a new
name in some directory where I can look at it later with appropriate
software.

Any ideas will be appreciated.

Dirk