https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5930

--- Comment #7 from Henrik Krohns <[email protected]> ---
For quick reference:

===================================================================
--- Check.pm    (revision 1626743)
+++ Check.pm    (working copy)
@@ -77,10 +77,8 @@
   # rbl calls.
   $pms->extract_message_metadata();

-  # Here, we launch all the DNS RBL queries and let them run while we
-  # inspect the message
-  $self->run_rbl_eval_tests($pms);
   my $needs_dnsbl_harvest_p = 1; # harvest needs to be run
+  my $rbls_running = 0;

   my $decoded = $pms->get_decoded_stripped_body_text_array();
   my $bodytext = $pms->get_decoded_body_text_array();
@@ -108,6 +106,13 @@
       last;
     }

+    # Here, we launch all the DNS RBL queries and let them run while we
+    # inspect the message
+    if (!$rbls_running && $priority > -10000) {
+      $rbls_running = 1;
+      $self->run_rbl_eval_tests($pms);
+    }
+
     my $timer = $self->{main}->time_method("tests_pri_".$priority);
     dbg("check: running tests for priority: $priority");


--- URIDNSBL.pm (revision 1626743)
+++ URIDNSBL.pm (working copy)
@@ -327,18 +327,21 @@
   return $self;
 }

-# this is just a placeholder; in fact the results are dealt with later
-sub check_uridnsbl {
-  return 0;
-}
-
 # ---------------------------------------------------------------------------

 # once the metadata is parsed, we can access the URI list.  So start off
 # the lookups here!
-sub parsed_metadata {
-  my ($self, $opts) = @_;
-  my $pms = $opts->{permsgstatus};
+
+#
+# only parse and run after first check_uridnsbl call
+#
+sub check_uridnsbl {
+  my ($self, $pms, @args) = @_;
+
+  # only parse once
+  return 0  if $pms->{uridnsbl_done};
+  $pms->{uridnsbl_done} = 1;
+
   my $conf = $pms->{conf};

   return 0  if $conf->{skip_uribl_checks};
@@ -494,7 +497,7 @@
   # and query
   $self->query_hosts_or_domains($pms, \%hostlist);

-  return 1;
+  return 0;
 }

 # Accepts argument in one of the following forms: m, n1-n2, or n/m,

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

Reply via email to