procmail
[Top] [All Lists]

Re: formail -> procmail -> formail??

2000-11-26 13:35:14
Michael asked,

| BUT, I'd like to filter out the digest headers and administrivia in 
| the process, so I tried the following (which obviously didn't work but 
| should give a clearer idea of what I WANT to do).
| 
| cat /archives/oct98  | formail -ds procmail ./remove_header.rc > oct98
| cat /archives/oct99  | formail -ds procmail ./remove_header.rc > oct99
| cat /archives/sep00  | formail -ds procmail ./remove_header.rc > sep00
| cat /archives/sep96  | formail -ds procmail ./remove_header.rc > sep96
| cat /archives/sep97  | formail -ds procmail ./remove_header.rc > sep97
| [... and so-on for 45 more lines...]

Stan's answer is accurate, but if the goal is to remove the headers for
delivery of the digest and store the component articles as individual
messages, don't call procmail at all.


#!/bin/sh
cd /archives
for file in *
do
  formail +1ds < $file > /other_directory/$file # insert correct directory path
done

Or if you want to do them one at a time from the command line while you're
cd'ed to the final storage directory,

formail +1ds < /archives/oct98 > oct98
formail +1ds < /archives/oct99 > oct98
formail +1ds < /archives/sep00 > sep00

and so forth for forty-eight more lines.

_______________________________________________
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>