procmail
[Top] [All Lists]

formail -> procmail -> formail??

2000-11-26 03:39:24
Hi, 

I've read through various procmail docs, faq, etc unsucessfully trying
to figure out how to do the following:

I have 50 email files containing about 60 Majordomo-style digests
in each file. I can use formail to break each folder into individual 
emails, shoving them back into similarly named files. 

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...]

"remove_header.rc" contains:
----------------------------
  MAILDIR=/archives/processed
  LOGFILE=$MAILDIR/procmail.log
  LOCKFILE=$MAILDIR/.lockmail
  VERBOSE=off
 
  :0    # get rid of digest header 
  * ^From:.*(audities-errors|owner-audities-digest|Majordomo(_at_)hal).*
  $MAILDIR/digest_headers
---------------------------

Now the filter works fine ;> BUT...procmail doesn't pipe its output
back out to be sent "may99, nov99, etc. Instead it dumps it into my 
INBOX (ie into $MAIL).

SO MY QUESTION: How can I accomplish my goal without have to resort
to a shell script? I want to keep each month's archives together, but
run through formail and stripped of the administriva/header msgs.

 - michael coxe
   vinyl(_at_)best(_dot_)com
_______________________________________________
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>