procmail
[Top] [All Lists]

Re: :0fhb?

1997-09-20 09:20:00
Luke Davis <ldavis(_at_)voicenet(_dot_)com> writes:
According to the manual, "h" and "b" are both the default.

Yes.  If either of 'h' or 'b' is given, they override the default:

        'hb'            feed both into the action
        'h'             feed just the header
        'b'             feed just the body
        ''              just like 'hb'
        'fhb'           feed both into the action, replacing the entire
                        message with what comes back
        'fh'            feed just the header into the action, append the
                        original body to what comes back to get the new
                        message
        'fb'            feed just the body into the action, prepend the
                        original header before what comes back to get the
                        new message
        'f'             just like 'fhb'

Procmail will relocate the header/body boundary whenever the header
changes, so a recipe that filters just the header can stick stuff at
the top of the body by putting a blank line in the middle of what it
returns.

Flag order never matters, so 'fhb' is the same as 'bfh', or 'bhf', or
...


So my question is: how do you just filter the body of a message, and have
procmail reappend the header after the body is returned?

You mean "_reprepend_ the header".

        :0 fb


I tried ":0fh", to just filter the header; and that looses the body.

It doesn't include the body in what is fed to the filter, but it should
reattach it after the filtering.  How did you determine that the body
had been lost?


Philip Guenther

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