procmail
[Top] [All Lists]

More on domain blocking, with exceptions list

1997-04-20 15:29:00

Here's what I have come up with for a simplified  
spam-filter-by-domain recipe

$DOMAINS is a list of known-to-be-spam domains, one per line, like this:

cyber-broadcasting.com
cyber-l-i-1.com
cyber-o-0-o.com
cyber-promo.com
cyber-t-p-l.com
cyberemag.com
cyberout.com
cyberout96.com
cyberpr0m0.com
cyberprom0.com
cyberpromo.com
someother.place.com

$DOMAINOVERRIDE is a list of exceptions to those domains, just in  
case I have a friend with an account at a domain I would otherwise  
filter, such as "someone(_at_)someother(_dot_)place(_dot_)com" (that file is 
also one  
address per line)

$SENDER is the return address of the person who sent the mail

The ! ^From line is to try and let through messages from people who  
might be responding to spam complaints

I want to catch any of those domains in any of the headers (yes I  
know this will match subject lines, etc but I would rather a mis-hit  
that I have to fix than have a spam get through)

:0
* ! ^From.*(root|postmaster|abuse)
*   ? fgrep -f $DOMAINS
* ! ? fgrep -f $SENDER $DOMAINOVERRIDE
Spam-By-Domain

Does this look like it will work based on the above criteria?

I want to catch all hostnames in the bad domains

Thanks again

TjL

ps -- fgrep is GNU fgrep

<Prev in Thread] Current Thread [Next in Thread>
  • More on domain blocking, with exceptions list, Timothy J. Luoma <=