Custom function white/black list bug?

Julian Field MailScanner at ecs.soton.ac.uk
Sat May 20 17:40:07 IST 2006


Richard,

Kai Schaetzl wrote:
> Richard Lynch wrote on Fri, 19 May 2006 22:32:11 -0400:
>
>   
>> I'm using the by domain whitelist/blacklist custom functions.  I'm 
>> trying to whitelist a particular "To:" address (abuse at our_domain).  I've 
>> put that entry into the /etc/MailScanner/spam.bydomain/whitelist/default 
>> file.
>>     
Why not in the spam.bydomain/whitelist/our_domain file? Wouldn't that 
make more sense?
>
> I'm not aware of this functionality besides the SQL custom functions (see 
> below), but it very much looks like "spam.bydomain" will be getting used 
> for the To domain. So, it's intended not to be used for single to 
> addresses.
>   
It is in CustomConfig.pm and has been for a very long time. I should 
move it out into a separate file in the CustomFunctions directory some 
time, but I'm not sure what might break on current installations if I do 
that...
>   However, when someone sends a spam report to our abuse address it 
>   
>> gets flagged as spam and gets deleted.  I'm not sure if this is a bug or 
>> not.  Perhaps this facility was designed only for the "From:" address 
>> and not the "To:" address.
>>     
>
> It was designed for the To *and* the From address.
It works for the envelope sender (From) and the first envelope recipient 
(To).
>> return 1 if $BlackWhite->{'default'}{$from}; 
>>  return 1 if $BlackWhite->{'default'}{$fromdomain}; 
>>  return 1 if $BlackWhite->{'default'}{$ip};
>>     
>
> "default" is actually the wildcard for "To: *"
>   
The Black and White list stuff can't handle wildcards in addresses or 
domains. That's what makes it so fast on large installations. It doesn't 
have to evaluate any regular expressions as it traverses a large set of 
rules. It just has to do a few hash table lookups which work like 
lightning in Perl. The speed of this code basically doesn't change 
whether you have 5 entries or 500,000 entries.

-- 
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.



More information about the MailScanner mailing list