procmail
[Top] [All Lists]

Re: extracting bodies into separate files.

1997-08-26 12:29:44
W. Wesley Groleau asked,

| What's the easiest way to take a single-file mailfolder (of already
| received messages), and put each message body in its own file?  
| 
| No headers, file name doesn't matter--as long as it's unique.  
| Directory for files may be in recipe.

  mkdir directory_name

  formail -ns procmail .bodysprinklerc < folder &

where $HOME/.bodysprinklerc contains this:

  :0b
  directory_name/

  DEFAULT=/dev/null # in case of fall-through

The need to lose the heads and save only the bodies requires an rcfile.
If we could have kept the heads we could have done it without an rcfile:

  mkdir directory_name

  formail -ns procmail DEFAULT=directory_name/ /dev/null < folder &

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