Subject: Re: Chain Letters

From: [email-masked] (Stephen R. van den Berg)
Date: Tue, 18 Oct 1994 14:52:25 +0100

Jerry Alexandratos <[email-masked]> wrote:
>was to have a recipe egrep for the string ``Forwarded Mail'', and see if
>it occured 5 or more times in the letter.  If it does, then it's safe to
>assume that it's a chain letter.  Maybe I could make it more robust and

>Okay, now my problem is that I've been having grief setting this recipe
>up.  First I thought all I would need would be a :5 HBc, and then have
>it send the copy to /dev/null, and then I would do a :0 A and have it
>just echo a letter out.  The only problem is that I can't figure out
>how to determine the return address.

Given a recent enough procmail (v3.00 or newer), the following should get
you started:

:0
* !^FROM_DAEMON
* !^X-Loop: [email-masked]
{
  :0 B
  * -4^0
  *  1^1 Forwarded Mail
  | (formail -r -A "X-Loop: [email-masked]" ; cat flame) | \
     $SENDMAIL -oi -t
}

"man procmailsc" for clues.

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

Real programmers don't just die, they produce core dumps.