[Bug 7735] Meta rules need to handle missing/unrun dependencies
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 --- Comment #78 from Henrik Krohns --- (In reply to Wolfgang Breyha from comment #77) > > IMO finish_meta_tests() fails to rerun rules if dependencies are resolved > later in the loop... but reading the comments in the code it tries at least. You might very well be right. Not sure what logic would work best here, it gets tedious iterating again and again.. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 7735] Meta rules need to handle missing/unrun dependencies
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 --- Comment #77 from Wolfgang Breyha --- I will try it ASAP. But even if it achieves the same as my patch I think this is not enough to guarantee that meta rules are always run with as much dependencies resolved as possible. This fix assures that meta rules are run as early as possible and makes things better, because many rules are run before reaching the "final call" in finish_meta_tests(). IMO finish_meta_tests() fails to rerun rules if dependencies are resolved later in the loop... but reading the comments in the code it tries at least. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 8065] disabled plugins cause undefined dependencies for meta rules
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8065 Bug 8065 depends on bug 7735, which changed state. Bug 7735 Summary: Meta rules need to handle missing/unrun dependencies https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug.
[Bug 8060] [review] Fix meta handling for metas without dependencies
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8060 Bug 8060 depends on bug 7735, which changed state. Bug 7735 Summary: Meta rules need to handle missing/unrun dependencies https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug.
[Bug 7987] DNSEval.pm,HashBL.pm,URILocalBL.pm: unnecessary use of rule_pending and rule_ready
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7987 Bug 7987 depends on bug 7735, which changed state. Bug 7735 Summary: Meta rules need to handle missing/unrun dependencies https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug.
[Bug 8062] [review] no URL makes uridnsbl rules "unrun"
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8062 Bug 8062 depends on bug 7735, which changed state. Bug 7735 Summary: Meta rules need to handle missing/unrun dependencies https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug.
[Bug 8059] [review] Fix meta handling for URIDNSBL NS/A lookups
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8059 Bug 8059 depends on bug 7735, which changed state. Bug 7735 Summary: Meta rules need to handle missing/unrun dependencies https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug.
[Bug 8061] [review] Fix meta handling for $suppl_attrib->{rule_hits}
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8061 Bug 8061 depends on bug 7735, which changed state. Bug 7735 Summary: Meta rules need to handle missing/unrun dependencies https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug.
[Bug 7735] Meta rules need to handle missing/unrun dependencies
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 Henrik Krohns changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #76 from Henrik Krohns --- (In reply to Wolfgang Breyha from comment #75) > I checked out rev 1905124 today, built a local package and tried to test it > with some of my test E-Mails I used before. Thanks for testing, it's hard to make comprehensive tests for this.. I think it might be as simple as this: --- lib/Mail/SpamAssassin/Plugin/Check.pm (revision 1905124) +++ lib/Mail/SpamAssassin/Plugin/Check.pm (working copy) @@ -316,7 +316,7 @@ $pms->got_hit($rulename, '', ruletype => 'meta', value => $result); } else { dbg("rules-all: ran meta rule $rulename, no hit") if $would_log_rules_all; - $h->{$rulename} = 0; # mark meta done + $pms->rule_ready($rulename, 1); # mark meta done } delete $mr->{$rulename}; delete $mp->{$rulename}; Can you try 1905124 + that change? rule_ready() does the same thing as your patch. Also got_hit() calls rule_ready(), in case someone is wondering. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 7735] Meta rules need to handle missing/unrun dependencies
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7735 --- Comment #75 from Wolfgang Breyha --- I checked out rev 1905124 today, built a local package and tried to test it with some of my test E-Mails I used before. I compared the results with my currently running 4.0-rc3 with the patches Henrik provided before and one patch I sent him privately (4 in sum). The results from trunk are worse then the results of my 4.0-rc3. I can't tell what's wrong exactly yet, but many rules are marked as "not hit" while the patched rc3 correctly hits them. On first sight it looks like some rules are not rerun if others (with dependencies) got hit after they were run. After reapplying this: -- --- /usr/local/spamassassin/share/perl5/Mail/SpamAssassin/Plugin/Check.pm.orig 2022-11-07 16:27:36.063764282 +0100 +++ /usr/local/spamassassin/share/perl5/Mail/SpamAssassin/Plugin/Check.pm 2022-11-07 16:29:54.476177667 +0100 @@ -297,6 +297,7 @@ my $mr = $pms->{meta_check_ready}; my $mp = $pms->{meta_pending}; my $md = $pms->{conf}->{meta_dependencies}; + my $mdr = $pms->{conf}->{meta_deprules}; my $mt = $pms->{conf}->{meta_tests}; my $h = $pms->{tests_already_hit}; my $retry; @@ -318,6 +319,9 @@ dbg("rules-all: ran meta rule $rulename, no hit") if $would_log_rules_all; $h->{$rulename} = 0; # mark meta done } +foreach (keys %{$mdr->{$rulename}}) { + $mr->{$_} = 1; +} delete $mr->{$rulename}; delete $mp->{$rulename}; # Reiterate all metas again, in case some meta depended on us -- ... I get better results. -- You are receiving this mail because: You are the assignee for the bug.