procmail
[Top] [All Lists]

Re: Rejecting multiple names/subjects at once?

1996-06-13 14:54:11
On Sun, 9 Jun 1996, AIRWAVES MEDIA wrote:

} Wotan <wotan(_at_)netcom(_dot_)com> wrote
}
} 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

 [...]

Thanks for the recipe, Wotan.

Is there a way to convert this to a text file that also scans for
'subjects'?  Many of the spams I deal with are best remedied with a
combination of 'subject line', 'user(_at_)site'  and just 'site'.  There
are some sites (videofantasy.com, for ewxample) where no good ever
comes of mail sent from there.

Too be honest - I doubt killing on specific subjects will be that 
effective.  These change with every mailing.  

But the principle should work fine with any specified element, so long as 
you could get formail to extract it.  For example, something like this:

FROM=`$FORMAIL -zrx To:| sed -e 's/.*@//'`

should allow you to test for specific sites (videofantasy, interamp, aol, 
etc.).

[I'm serious about AOL.  Too many of them are still clueless - and will 
fill my inbox if they object to a posting.]
 
Although your notion of file names is also good because it has a date
stamp right there.  Let me ask you, can these files contain anything?
I mean let's say I want to place a few lines in there explaining why I
put them in the bozo file, or maybe a copy of their post that placed
them there (for future reference and 'proof' of mis-behavior)?

Yes.  All this does is test to see if the file exists.  Mine are empty 
becuase I use touch to create them.  

Can this recipe be expanded to include the subject and site only
information?  Or should something new be created.... maybe perl or
something?

Fairly easily.  But while killing on the site would be effective - IMHO, 
subject kills will be pretty inneffective.  The problem is that the 
subject gets changed quite a bit.  I have often recieved multiple copies 
of the same junk with the only difference being slight variances in the 
subject line.

Fortunately, the users here at Netcom are quite forthcoming when they get 
junk mail.  And post enough info for a quick modification to the bozo 
filters to be effective.   

--
The computer is the ultimate polluter: its shit is indistinguishable
from the food it produces.