procmail
[Top] [All Lists]

RE: Extracting on the msg body and writing it to a file

2002-03-29 13:51:05


-----Original Message-----
From: procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE]On Behalf Of Dan 
Hammond
Sent: Friday, March 29, 2002 11:30 AM
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Extracting on the msg body and writing it to a file


Does anyone have a procmail recipe that will extract only the
content of the msg body and save it to a file?  I've been playing
with a few options using formail and procmail and haven't been
successful yet.


I think you want to use the 'b' flag here (man procmailrc):

          b    Feed the body to the pipe,  file  or  mail  destination
               (default).

as follows:

BODY_FILE="filename_of_your_choice"
:0 b:
| cat >> $BODY_FILE

Above, the ":" following the 'b' indicates default locking, which will lock on
the $BODY_FILE, which is probably something you want to do.  Note that this is
a delivering receipe, so no further processing will be done. You can modify
that behavior with the 'c' flag, telling the recipe to operate on a copy.


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