User controlled whitelist/blacklist

Julian Field mailscanner at ecs.soton.ac.uk
Sat May 17 17:48:12 IST 2003


At 15:37 17/05/2003, you wrote:
>On Thu, 2003-05-15 at 17:31, Julian Field wrote:
> >
> > No, it doesn't. It just does simple lookups for speed.
> >
> > This is the matching code: it shows that just the "From" address (envelope
> > sender), the domain of that address and the exact IP address are tested.
> > You can specify a whitelist/blacklist for an individual email address or an
> > individual domain.
> >
> > I might expand this later to allow IP prefixes and possibly domain
> > suffixes, but I have no immediate plans for this. Feel free to add to the
> > code yourselves!
> >
> >    return 1 if $BlackWhite->{$to}{$from};
> >    return 1 if $BlackWhite->{$to}{$fromdomain};
> >    return 1 if $BlackWhite->{$to}{$ip};
> >    return 1 if $BlackWhite->{$todomain}{$from};
> >    return 1 if $BlackWhite->{$todomain}{$fromdomain};
> >    return 1 if $BlackWhite->{$todomain}{$ip};
>
>Thanks Julian, I don't think the wildcard limitation is all that big of
>a deal for me but it would be nice.  I am trying to mod the code a
>little to add support for an "everybodyelse" black/whitelist.
>
>Actually, my issue is mainly with blacklists.  I have a customer who is
>on a crusade to wipe out *all* spam for his domain.  He sends me new
>blacklist entries everyday.  The problem is that he's a bit overzealous
>and I end up blocking sites for other customers who don't want it.  So,
>my plan is...
>
>1. Move all of his blacklist entries to his own config file in
>.../by.domain/blacklist.  He has multiple domain names so I've created
>logical links (ln -s) of those domain names to his main config file.
>
>2. Will update the MailScanner.conf file with "Is Definitely Spam =
>&ByDomainSpamBlacklist".
>
>3. I would still like to have a global blacklist for everybody else so
>I've created a file called ".../by.domain/all" that I can put global
>entries in.
>
>4. I've modified the code in CustomConfig.pm with these entries...
>
>   return 1 if $BlackWhite->{all}{$from};
>   return 1 if $BlackWhite->{all}{$fromdomain};
>   return 1 if $BlackWhite->{all}{$ip};
>
>   ...inserted right after your matching code.
>
>
>Is this the right approach?  I handle several other domains and am
>trying to avoid having to duplicate blacklist entries that I want to be
>applied globally.  Thanks for all of your help.

That should work a treat. Call it "default" instead of "all" and I'll put
your contribution into the distribution for you.
--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list