procmail
[Top] [All Lists]

Re: [Q]: munging digests

1998-04-08 12:58:23
Liviu Daia asked,

|     I'm subscribed to a few mailing lists that send me mail digests.
| The embedded messages don't have "To:" or "Cc:" headers, and
| occasionally some of them are spam (yes, the Procmail list is not very
| original in this respect ;-)). So basically I'd like to do three kinds
| of things:
| 
| (1) Split the digests into separate messages;
| (2) Distribute the "To:" line of the digests to the embedded messages;
| (3) Run the resulting messages through Procmail again to remove spam.

OK ... first, you need a recipe for the individual articles on their second
pass through procmail (or you could specify another rcfile [but do not use
-m] and put the recipes in there rather than between these braces).  It
should come before the recipe for the digest deliveries in case an individual
article is from the list maintainer and matches ^From:.*Digestifier, but
after most of your spam detection routines:

 :0 flags
 * ^X-Loop: burst from Digestifier Digest
 { routines_for_its_individual_articles, including any special spam detection }

Now, for the digest deliveries themselves:

  :0
  * ^From:.*Digestifier
  * ^To:\/.*
  | formail -za "To:$MATCH" -A "X-Loop: burst from Digestifier Digest" \
    +1 -ns procmail

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