procmail
[Top] [All Lists]

Re: forcing line wraps

2002-04-04 09:26:34
On Tue, Apr 02, 2002 at 04:32:46PM -0500, Bill Tangren wrote:
I was wondering if someone could tell me how to write a recipe that 
would use the 'fold -s' command on the message body to force line wrapping.

How about something along the lines of

        :0 Bbf
        * 
^.................................................................................
        |fold -s

(untested). The flags say grep the body, feed the body through the pipe, and
treat it as a filter. The pattern matches 81 characters, so any message with a
body line containing more than 80 characters will trigger a match. And the
action is to pipe through fold -s.

You could also just pipe _everything_ through fold -s with the simpler

        :0 bf
        |fold -s

I think.

-Bennett
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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