> I have been going nuts trying to get the attached recipe to work.
> Stuff processed by all recipes before it works fine, as advertised.
> But it appears to be treating the list of blocked spam addresses
> as a folder to which to send email, according to my log and from
> looking at a truly wierd file in my MAIL directory.
Please check out another mail from me regarding LINEBUF and alternatives
to huge patterns in recipes. The essentials:
1. Set LINEBUF to a larger number. By default it is 2048.
2. Use egrep -f SOMEFILEOFPATTERNS on the input addresses to reduce
the pattern size, and to make it easier to maitain a file of
addresses of spammers.
Here's how I would rewrite your recipe:
# "spamsters" is a file of regular expressions, one per line,
# matching spamming sources
:0c # keep a copy of the spammed mail
* ? formail -xFrom -xFrom: -xSender: -xReply-To: | \
egrep -s -f spamsters
* !X-Loop: *noloop(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com
| spam.incoming
SUBJ=`formail -zxSubject: | sed -e 's/Re: *//g'`
:0Afh # spam mail; form a reply header
| formail -brt -I"From: Ariel's Mail-Agent <$LOGNAME>" \
-I"Subject: Re: $SUBJ" \
-I"Precedence: junk" \
-A"X-Loop:
noloop(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com"
# "blockmail" should say something about why the mail is being
# bounced, and end with something like "Your original mail follows":
# If you choose not to include the original mail, then remove
# the "-" argument to cat and add the "i" flag to the recipe
# header.
:0afb # form a reply body
| cat $MAILDIR/forms/blockmail -
:0a # send the reply
! -t
Please read the man page of "procmailrc" and pay close attention to the
use of "a", "A", and "i" flags.
G'luck.
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com> http://reality.sgi.com/aks
> The log extract is attached first. The recipes are attached
> afterward. Any help is welcome -- I am relatively new to this
> and certainly new to doing anything of this magnitude.
>
> Thank you!
>
> Catherine
>
> =-=-=-=-=-=-=-=-=-=
> LOG EXTRACT
>
> >From ariel(_at_)reveal(_dot_)org Wed Oct 30 10:03:25 1996
> Subject: Test from ariel(_at_)reveal(_dot_)org
> Folder: zoom\.com|\ (_dot_)*(_at_)(_dot_)*zoom\(_dot_)net|\
reveal(_at_)best\(_dot_)com 563
>
> =-=-=-=-=-=-=-=-=-=
> SPAM FILTER RECIPE
>
> # Set some variables
> SHELL=/bin/ksh
> PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
> MAILDIR=$HOME/Mail #you'd better make sure it exists
> DEFAULT=$MAILDIR/incoming #completely optional
> LOGFILE=$MAILDIR/log #recommended
>
> (deletia -- recipes which I have verified are working right)
>
> #Handles spam sent to an address I use with my browser, in case a
> #site I browse is gathering spam addresses this way.
> :0
> * ^TOnospam(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com
> * !^X-Loop: noloop(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com
> {
> :0 c
> $HOME/addspam
>
> :0 c
> spam.incoming
>
> :0
> | (formail -brt -A"X-Loop:
noloop(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com";cat $MAILDIR/forms/nospam) |
$SENDMAIL -oi -t
> }
>
> # The main spam filter -- here's where the problem appears to lie.
> :0
> * ^(From|Reply-To).((_dot_)*(_at_)(_dot_)*1stamend\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*add-url\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*admail|\
> (_dot_)*(_at_)(_dot_)*enterprise\(_dot_)america\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*arvon-usa|\
> (_dot_)*(_at_)(_dot_)*bbbiiizzz\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*bigprofits\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*bizimage\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*brobro\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*bulkads\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*bulk-e-mail\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*businesslink\(_dot_)net|\
> (_dot_)*(_at_)(_dot_)*buytime\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*californiakid\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*chag\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*clever\(_dot_)net|\
> (_dot_)*(_at_)(_dot_)*cvcom\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*cyber-promo\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*cyberemag\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*cyberpromo\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*cyberpromotions\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*cyberspace\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*dm1\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*email2u\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*emailsrus\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*emaster\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*fight4rights\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*fincon\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*flixxx|\
> (_dot_)*(_at_)(_dot_)*freeconnect\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*freeview\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*gohomeray\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*helpnet|\
> (_dot_)*(_at_)(_dot_)*hereyougo\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*honeys\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*hotgrrls\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*ibb\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*inteam|\
> (_dot_)*(_at_)(_dot_)*internetfree\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*@isp-inter\.net|\
> (_dot_)*(_at_)(_dot_)*juno\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*l-e-n\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*loop\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*luv2cu\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*magazineclub|\
> (_dot_)*(_at_)(_dot_)*mailreport\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*massemail\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*megd\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*moneyworld|\
> (_dot_)*(_at_)(_dot_)*natureplus|\
> (_dot_)*(_at_)(_dot_)*netamerica1|\
> (_dot_)*(_at_)(_dot_)*netrail\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*noblock\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*nocensorship\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*ntview\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*ntz\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*pleaseread\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*po\(_dot_)net|\
> (_dot_)*(_at_)(_dot_)*ppgsoft|\
> (_dot_)*(_at_)(_dot_)*promocyber\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*pwrnet\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*randomdomain\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*rapidvend\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*reedrules\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*resultnet\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*sanfordw\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*savepaper\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*savetrees\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*seemen\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*selfhelpnet\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*seriousincome\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*servint|\
> .*sftcell.*|\
> (_dot_)*(_at_)(_dot_)*shoppingplanet|\
> .*SoftCell\.Marketing\.Inc.*|\
> (_dot_)*(_at_)(_dot_)*snappy\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*swallace\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*sweeties\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*sweinc\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*vbox\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*webcreations\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*yougotmail\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*youvegotemail\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*zoom\(_dot_)com|\
> (_dot_)*(_at_)(_dot_)*zoom\(_dot_)net|\
> reveal(_at_)best\(_dot_)com)
> * !^X-Loop: noloop(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com
> {
> :0 c
> spam.incoming
>
> :0
> | (formail -brt -A"X-Loop:
noloop(_at_)ariel(_dot_)vip(_dot_)best(_dot_)com";cat $MAILDIR/forms/blockmail)
| $SENDMAIL -oi -t
> }