http://bugzilla.spamassassin.org/show_bug.cgi?id=3538

           Summary: DNSBL results not harvested due to timing bug
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P5
         Component: Libraries
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I just spotted this while testing some DNSBL rules with no other rules active;
if you don't have enough rules, the DNSBL tests will never be "harvested", it
seems.  (this may only apply if the only rules are urirhsbl/urirhssub rules,
which is how I got it to happen).

if you *do* have enough rules, as in the default ruleset, you'll get some of the
hits OK, because the rules themselves will take long enough for at least some of
the DNSBL hits to arrive before PerMsgStatus leaves the check loop.  but this
can be triggered by removing the default ruleset.

the bug's in the priority code, AFAICS. to reproduce:

- cd masses
- mkdir testrules
- create a testrules/01_test.cf file containing something like this:

  urirhsbl       SURBL_AB    ab.surbl.org.    A
  header         SURBL_AB    eval:check_uridnsbl('SURBL_AB')
  tflags         SURBL_AB    net

- run "./mass-check --net -j=1 -c=testrules -f targets"
- no SURBL_AB hits will be seen.

this fixes it, but is a horrific kludge workaround, so I won't dignify it with a
real patch:

--- lib/Mail/SpamAssassin/PerMsgStatus.pm       (revision 22093)
+++ lib/Mail/SpamAssassin/PerMsgStatus.pm       (working copy)
@@ -169,7 +169,7 @@

       # only harvest the dnsbl queries once priority HARVEST_DNSBL_PRIORITY
       # has been reached and then only run once
-      if ($priority >= HARVEST_DNSBL_PRIORITY && $needs_dnsbl_harvest_p) {
+      if ($needs_dnsbl_harvest_p) {
        # harvest the DNS results
        $self->harvest_dnsbl_queries();
        $needs_dnsbl_harvest_p = 0;

The real fix will, doubtless, be quite different ;)

HARVEST_DNSBL_PRIORITY looks like it's not used in Conf.pm or Conf/Parser.pm --
did we lose it after it was added?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to