| jzc(_at_)sibs(_dot_)com writes:
| >I am using the following recipe to save an incoming message to
| >a file:
| >* ^Subject: saveme
| >I have two questions:
| >1. The file: savedfile contains not only message text but also
| >the email headers, how can I eliminate all the headers so Procmail
| >only saves the message body.
The `b' flag handles that.
| >2. When a new message arrives, the new message is appended to
| >the exiting savedfile. How can setup the recipe, so the new
| >message will overwrite the exiting savedfile.
For that, you need to clobber the existing file with a pipe to cat instead
of using a simple save.
Philip Guenther answered the same way but made one small mistake:
| # The 'b' flag indicates that procmail should only write out the body.
| # See the procmailrc(5) manpage for details.
| :0 b:
| * ^Subject: saveme
| |cat >savedfile
Er, not quite. The recipe's action is not a simple save-to-folder, and
the command after the pipe does not have an append redirector (">>"), so
there is no implicit name for the local lockfile.
The solution is to specify a name for the local lockfile:
* ^Subject: saveme
| cat > savedfile