SA Bugzilla – Bug 5959
do not de-duplicate eval rules
Last modified: 2008-08-15 11:53:26 UTC
Internally, the URIDetail plugin converts each "uri_detail" rule to a body eval rule that runs "check_uri_detail()". Different invocations of this function give different results because it checks $pms->{current_rule_name} and it uses the rule name to look up the actual definition of the rule in the config. The "merge duplicate rules" code, as it's currently implemented, merges together rules with the same "definition", so only one uri_detail rule ever gets run. Obviously, this is a bad thing. It's pretty straightforward to fix the URIDetail plugin, but it's likely that there are third party plugins that work the same way, and it's definitely a gotcha for Plugin creators. I would suggest that the "merge duplicates" code should be limited to regex rules. It seems useful to have multiple (different) rules that run the same eval rule code with the same (or no) arguments.
'I would suggest that the "merge duplicates" code should be limited to regex rules. It seems useful to have multiple (different) rules that run the same eval rule code with the same (or no) arguments.' ok, I can see that being valid -- +1
duncf@orange:~/svn/apache/spamassassin$ svn commit Sending lib/Mail/SpamAssassin/Conf/Parser.pm Sending t/duplicates.t Transmitting file data .. Committed revision 686317.