procmail
[Top] [All Lists]

Re: procmailrc

1998-04-30 13:54:52
Salvatore Greco <salvo(_at_)reaper(_dot_)org> writes:
I am looking to use procmail and formail to strip the header of a message and
append the body of a message to a txt file.

So, you want to append the body of each message to a file.  You can tell
procmail to only deliver the body and not the header by putting the 'b'
flag on the recipe.  Therefore the following should work:

        # 'b' flag causes only the body (not the header) to be delivered
        # 'c' flag causes procmail to treat this the delivery of the 'c'opy
        #     of the message, and therefore it will continue processing the
        #     procmailrc with the entire message still in memory (the 'b'
        #     flag only affects this recipe).
        # the colon tells procmail to use dotlocking to keep the file
        #     "message" from being corrupted from two procmail processes
        #     writing to it at the same time.
        :0 bc:
        message


Philip Guenther

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