procmail
[Top] [All Lists]

Re: digest messages

2000-03-07 00:42:18
"S.Toms" <tomas(_at_)primenet(_dot_)com> writes:
 I really like the filter that allows a digest message to be broken up
into it's individual messages and then added to the appropriate mail
folder, but I'm wondering if theres a way to add a special header to each
broken out message, unfortunately, I'm unsure how to go about it. Any
ideas?

 I've tried the following, which works, but seems kinda clunky and slow
to me.

:0f
| formail +1 -ds formail -bfi "Reply-To: blah(_at_)blah(_dot_)com" >> 
mailfolder

 is there a better way?

You almost certainly don't want the 'f' flag on that recipe.  It'll cause
an empty message to be processed by the rest of your rcfile.  You should
instead use the 'w' flag to catch the return code of the formail command.
As for making this nicer, you can give formail header alteration flags
(-i, -a, etc) when splitting and they will be applied to each message
that is split out.

        :0 w:
        | formail +1 -bfi "Reply-To: blah(_at_)blah(_dot_)com" -ds >> mailfolder

The second colon tells procmail to put a locallockfile on the file
specified after the >> in the action.


Philip Guenther

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