On Thu, 6 Jun 1996, AIRWAVES MEDIA wrote:
I imagine this should be of interest to many procmail users. It may
even be A faq, so if it has already been done, a pointer ito the
correct code is fine and appreicated...
I need a recipe that will allow me to keep a file of addresses and/or
subjects that I want sent to /dev/null before I even see them.
I want to be able to add to, remove from this list easily by editing a
text file.
This is what I use to eliminate garbage from the known bozos.
:0
{
DELIVERED=yes # tell sendmail to go away
#Set values
FROM=`$FORMAIL -zrx To:| sed -e 's/@netcom[0-9.]*.*//'`
BOZOS=$PMDIR/.nobozo # No ack wanted
:0 # if we are here, remove from ack recipients
#If the twit resides in directory $BOZOS - act on this mail
* ? test -f $BOZOS/$FROM
| $FORMAIL -r; cat $PMDIR/bozo | $SENDMAIL -oi -t
}
.nobozo is a directory containing 0 byte files, and the names of the
files are the addresses of people I don't want to hear from.
Format looks like so:
---------- 1 wotan users0 0 May 13 21:03 anon(_at_)anon(_dot_)com
-rw------- 1 wotan users0 0 Apr 24 19:42
bobhenry(_at_)cymedia(_dot_)com
---------- 1 wotan users0 0 May 14 12:02
brunner(_at_)Think(_dot_)COM
---------- 1 wotan users0 0 May 16 19:31
cobragt(_at_)ix(_dot_)netcom(_dot_)com
-rw------- 1 wotan users0 0 May 8 01:11
dgbryce(_at_)user(_dot_)rose(_dot_)com
---------- 1 wotan users0 0 Apr 24 21:52
director(_at_)djsa(_dot_)com
---------- 1 wotan users0 0 May 9 09:59
elcobar(_at_)ix(_dot_)netcom(_dot_)com
--w------- 1 wotan users0 0 May 15 09:06
jlnelson(_at_)mole(_dot_)uvm(_dot_)edu
---------- 1 wotan users0 0 May 15 01:22
ksaves(_at_)prairienet(_dot_)org
-rw------- 1 wotan users0 0 Apr 25 19:32
ryanshap(_at_)ix(_dot_)netcom(_dot_)com
---------- 1 wotan users0 0 May 12 01:10 stefanm(_at_)rpi(_dot_)edu
---------- 1 wotan users0 0 Apr 25 20:45
webtext(_at_)djsa(_dot_)com
I create them with either touch (if I read about them before they mail
me) or by simply using mv to move them from my .acks directory.
--
Hackers do it with fewer instructions.