https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7987

--- Comment #18 from Henrik Krohns <apa...@hege.li> ---
(In reply to Michael Storz from comment #17)
> If that
> could happen the logic of the eval rule is too complex and should be changed.

A DNSBL can do this:
- It parses for example 4 IP addresses from Received
- For each of the IP it starts a separate bgsend_and_start_lookup, expecting 4
separate callbacks

Obviously if got_hit() is called, we know rule is ready regardless of any
pending lookups.

What things should the callback do if there is no hit?

Current logic:

sub callback {
  rule_ready(thisrule)
  foreach (answer) {
    if (match) got_hit(thisrule)
  }
}

Using got_miss() would probably be:

sub callback {
  foreach (answer) {
    if (match) got_hit(thisrule)
  }
  if (!tests_already_hit(thisrule) && !get_async_pending_rules(thisrule))
    got_miss(thisrule)
}

I guess we could brind back the deprecated Dns/is_rule_complete function, which
can do the checks. So would this be the most elegant flow?

sub callback {
  foreach (answer) {
    if (match) got_hit(thisrule)
  }
  if (is_rule_complete(thisrule)) got_miss(thisrule)
}

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

Reply via email to