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

--- Comment #12 from Mark Martinec <mark.marti...@ijs.si> ---
Found another test case which the current code gets wrong, and
the t/uribl.t (test 5) covers the failure by claiming that
this is an expected result.

The test 5 in t/uribl.t is:

  urifullnsrhssub X_URIBL_FULL_NS  dnsbltest.spamassassin.org.  A 8
  body       X_URIBL_FULL_NS  eval:check_uridnsbl('X_URIBL_FULL_NS')
  tflags     X_URIBL_FULL_NS  net

The sample message is t/data/spam/dnsbl.eml, which contains
an URL http://spamassassin.org/.

The urifullnsrhssub is supposed to collect NS records of spamassassin.org,
which are: a.auth-ns.sonic.net, b.auth-ns.sonic.net, c.auth-ns.sonic.net
and ns.hyperreal.org, then submit these host full host names (not just
their domains) to a DNS BL test zone dnsbltest.spamassassin.org:

  $ host -t a hyperreal.org.dnsbltest.spamassassin.org
  hyperreal.org.dnsbltest.spamassassin.org has address 127.0.0.8

  $ host -t a ns.hyperreal.org.dnsbltest.spamassassin.org
  Host ns.hyperreal.org.dnsbltest.spamassassin.org not found: 3(NXDOMAIN)

Note that ns.hyperreal.org.dnsbltest.spamassassin.org is *not* in the
zone, so rule X_URIBL_FULL_NS should *not* have fired.

The hyperreal.org.dnsbltest.spamassassin.org however *is* in the BL zone,
so the other test rule X_URIBL_NS does fire correctly:

  urinsrhssub X_URIBL_NS  dnsbltest.spamassassin.org.  A 8

... yet because X_URIBL_NS happens to have the same subtest (8) as
X_URIBL_FULL_NS, it incorrectly drags the X_URIBL_FULL_NS with itself.



Btw: seems like subroutines lookup_a, lookup_ptr, lookup_mx, and
lookup_mx_exists in Dns.pm are not used anywhere??? Drop?
(And the lookup_ns is only used during startup by is_dns_available()
in the same module.)

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

Reply via email to