Provided I'm understanding the functionality of
GreedyWhitelistAdditions, for clarity, I'd change the description from
['GreedyWhitelistAdditions','How add Greedy Senders to
Whitelist','0:envelop only|1:all',\&listbox,1,'(.*)',undef,
'In addition to the setting in NotGreedyWhitelist , you can define
what addresses will be added to
whitelist.',undef,undef,'msg008780','msg008781'],
to
['GreedyWhitelistAdditions',Sender Addresses to Add To
Whitelist','0:envelope only|1:all sender
addresses',\&listbox,1,'(.*)',undef,
'Defines what sender addresses are added to the whitelist if a
message is considered to be from a whitelisted sender.
NotGreedyWhitelist is considered in determining if a message is from a
whitelisted sender.',undef,undef,'msg008780','msg008781'],
Note that I fixed a type-o, envelopE only.
I'd like to see an option 2:None here. Implementation idea below.
Then change NotGreedyWhitelist to be have the header
Only the compare the envelope-sender to the whitelist (doesn't talk
about adding)
and reword the 3 options (functionality unchanged) to:
check all addresses - consider whitelisted if ANY match
only check the envelope
check all addresses - only consider whitelisted if ALL match,
I think that better describes everything. NotGreedyWhitelist
determines if the message is considered whitelisted.
GreedyWhitelistAdditions determines what addresses are added to the
whitelist. I think that the code already does this, it's just
described in an unclear way.
In the code, I see that you consider $GreedyWhitelistAdditions when
deciding if %a gets the sender addresses added. That's fine. Several
lines down though, you also consider it when getting the to and cc
addresses out. I don't think that's right since we're only talking
about SENDER addresses here, not recipient addresses.
I >>think<< the code that is:
# keep the whitelist up-to-date
my %a=%senders if $GreedyWhitelistAdditions;
my $t=time;
$a{$fm}=1;
$header=~s/\n\s+/ /g;
while($header=~/\n(to|cc): (.*)/ig && $GreedyWhitelistAdditions) {
my $ad=$2;
while($ad=~/($emailadr...@$emaildomainre)/go) {
my $s = $1;
$s = $1 if ($s =~ /^prvs=\d\d\d\d\w{6}=(.*)/);
$a{lc $s}=1;
}
}
should be
# keep the whitelist up-to-date
my %a=%senders if $GreedyWhitelistAdditions == 1; <-- only if
1, not 0 or 2 to implement NONE as an option
my $t=time;
$a{$fm}=1 if $GreedyWhitelistAdditions <> 2; <--- changed if
you implement option 2, NONE
$header=~s/\n\s+/ /g;
while($header=~/\n(to|cc): (.*)/ig ) { <!-- got rid of the
greedywhitelistadditions comparision here
my $ad=$2;
while($ad=~/($emailadr...@$emaildomainre)/go) {
my $s = $1;
$s = $1 if ($s =~ /^prvs=\d\d\d\d\w{6}=(.*)/);
$a{lc $s}=1;
}
}
Please check my logic though.
Also, might we need to consider whitelisted messages due to SenderBase?
Thanks again. Looking forward to seeing the block report tomorrow morning.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test