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

            Bug ID: 7777
           Summary: askdns problem with multi-valued resource records
           Product: Spamassassin
           Version: 3.4.2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
          Assignee: dev@spamassassin.apache.org
          Reporter: sa-...@lrz.de
  Target Milestone: Undefined

askdns only works on the first resource record it receives even if it is a
multi-value RR.

Example:

dig +short txt lrz.de
"google-site-verification=aery99S4-qQNyQyHH2_P3UlwnXrfYgKa-BHwwKDRY1w"
"v=spf1 redirect=_spf.mail.lrz.de"

echo 'From: t...@lrz.de'|spamassassin -D all  --cf 'askdns LRZ_ASKDNS
_AUTHORDOMAIN_ TXT /.+/' 2>&1|grep LRZ_ASKDNS|grep listed
Dec 11 16:13:49.624 [109500] dbg: askdns: domain "lrz.de" listed (LRZ_ASKDNS):
google-site-verification=aery99S4-qQNyQyHH2_P3UlwnXrfYgKa-BHwwKDRY1w

or

echo 'From: t...@lrz.de'|spamassassin -D all  --cf 'askdns LRZ_ASKDNS
_AUTHORDOMAIN_ TXT /.+/' 2>&1|grep LRZ_ASKDNS|grep listed
Dec 11 16:14:05.619 [109689] dbg: askdns: domain "lrz.de" listed (LRZ_ASKDNS):
v=spf1 redirect=_spf.mail.lrz.de

It never checks both records.

Deleting the line 

$pms->{askdns_map_dnskey_to_rules}{$dnskey}[$j++] = undef;

solves the problem for me:

echo 'From: t...@lrz.de'|spamassassin -D all  --cf 'askdns LRZ_ASKDNS
_AUTHORDOMAIN_ TXT /.+/' 2>&1|grep LRZ_ASKDNS|grep listed
Dec 11 16:19:42.411 [111140] dbg: askdns: domain "lrz.de" listed (LRZ_ASKDNS):
v=spf1 redirect=_spf.mail.lrz.de
Dec 11 16:19:42.411 [111140] dbg: askdns: domain "lrz.de" listed (LRZ_ASKDNS):
google-site-verification=aery99S4-qQNyQyHH2_P3UlwnXrfYgKa-BHwwKDRY1w

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

Reply via email to