Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!trac2000!das From: das@trac2000.ueci.com (David Snyder) Newsgroups: comp.mail.elm Subject: Re: Filter question Keywords: Filter Message-ID: <1023@trac2000.ueci.com> Date: 23 May 91 11:04:44 GMT References: <225835.4481@timbuk.cray.com> Organization: UE&C - Catalytic in Philadelphia, PA Lines: 37 In article <225835.4481@timbuk.cray.com>, anoosh@cray.com (Anoosh Mostaghimi) writes: > > I need a set of filter rule(s) or a clever "execute" to be able > to based on a given "To:" field of a mailing list to *bounce* a > copy of that email to several other folks and still keep a copy > of that email in my /usr/spool/mail. > Sounds like you want "forwardcopy". Here --------- Snip Here --------- Snip Here --------- Snip Here --------- Snip # forwardcopy # forwards a COPY of mail to others # usage: forwardcopy mailbox forwarder(s)... MAILBOX=$1; shift FORWARDERS=$* TMPMAIL=/tmp/tmpmail$$ # Put mail in a tmp file and extract the subject cat >$TMPMAIL set `grep "^Subject:" $TMPMAIL`; shift; SUBJECT="$* (fwd)" # Copy contents of TMPMAIL to mailbox cat $TMPMAIL >>/usr/mail/$MAILBOX # Send contents of TMPMAIL to FORWARDERS elm -s "$SUBJECT" $FORWARDERS <$TMPMAIL # Clean up when done rm -f $TMPMAIL Here --------- Snip Here --------- Snip Here --------- Snip Here --------- Snip DAS -- David A. Snyder @ UE&C - Catalytic in Philadelphia, PA UUCP: ..!uunet!trac2000!das INTERNET: das@trac2000.ueci.com