procmail
[Top] [All Lists]

Re: Would this "refuse" recipe work?

1996-08-06 16:07:12
On Mon, 5 Aug 1996, John P. Black wrote:

I have been receiving mail from this butthole for a few weeks now, and I'd
like to setup a recipe to refuse all of his mail. He has two known
addresses, and I'd like to set this recipe for both addresses. For this
example I'll call him "Kyle" and I'll say his e-mail addresses are
<kyle(_at_)isp(_dot_)com> and <kyle(_at_)aol(_dot_)com>.

I like mine better:

FROMZ="Brock Rozen's Spam Removal System <$COMSAT>"
SPAMLOG=$PMDIR/log.spams
SPAMCACHE=$PMDIR/cache.spams
SPAMMATCH=`perl5 -p -0377 -e 's:\n*$::;s:\n+:|:g;s:\.:\\.:g' $SPAMCACHE`

:0hc
* !^X-Loop: $COMSAT
* $ ? test -s $SPAMCACHE
* $ ^From:.*(${SPAMMATCH})
| ($FORMAILZ -I 'From ' \
        -I"From: $FROMZ" -r \
        -A"X-Loop: $COMSAT" \
        -A"Precedence: junk" \
        -I"Subject: Stop Spamming Me!";\
   cat $PMDIR/text.spams) | $SENDMAIL -oi -t

        :0A:
        | ( $FORMAILZ -XFrom: -XDate: -XSubject: ; echo ) >> $SPAMLOG


SPAMCACHE is in the format of one e-mail address per line.
text.spams is the message sent to the person.

The other variables should be obvious.

 ------------------------------------------------------------------------- 
 | Brock Rozen | brozen(_at_)netvoyage(_dot_)net | 
http://www.netvoyage.net/~brozen | 
 ------------------------------------------------------------------------- 

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