I actually did the work for you to find the bug. The problem is in this file:
Line: 204, 220, 241, 262, and others. Double check all regular expressions.
There could be others. The problem is that you have statements like this:
Code: Select all
foreach my $domain (keys %setdomains) {
if ($ssr[$x] !~ /\*\@$domain\s/) {next}
my ($spam,$lspam,$hspam,$virus,$dvirus,$notused,$altemail) = split(/\:/,$setdomains{$domain});
$ssr[$x] = "$msconfig{spam_scanning_rules_ini}\t*\@$domain\t$spam";
delete $hitdomains{$domain};
}
The issue here is that you are doing a regular expression match with out quoting the meta characters. So when you do:
Code: Select all
if ($ssr[$x] !~ /\*\@$domain\s/) {next}
That will match both "my.domain.com" and "my-domain.com" because the period after the "my" is considered a meta character and periods match everything. Thus both domains are matching here when they shouldn't. So this fix is to make sure each one has its meta characters quoted via:
Code: Select all
my $mdomain = quotemeta($domain);
and I have verified this solved the problem:
Code: Select all
foreach my $domain (keys %setdomains) {
my $mdomain = quotemeta($domain);
if ($ssr[$x] !~ /\*\@$mdomain\s/) {next}
my ($spam,$lspam,$hspam,$virus,$dvirus,$notused,$altemail) = split(/\:/,$setdomains{$domain});
$ssr[$x] = "$msconfig{spam_scanning_rules_ini}\t*\@$domain\t$spam";
delete $hitdomains{$domain};
}
I believe there are other areas throughout these scripts where the same sort of scenarios are happening with meta characters not being escaped. For me this is the only issue I was having though, but meta characters should be escaped before trying to match which might solve other "bugs".