Skip Menu |

This queue is for tickets about the Mail-SPF-Query CPAN distribution.

Report information
The Basics
Id: 6381
Status: resolved
Priority: 0/
Queue: Mail-SPF-Query

People
Owner: JMEHNLE [...] cpan.org
Requestors: njh [...] bandsman.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.992
  • 1.993
  • 1.994
Fixed in:
  • 1.996
  • 1.997
  • 1.998



Subject: Net::DNS says you have a bug
make test loads (170+) of errors like this:- *** *** WARNING!!! The program has attempted to call the method *** "char_str_list" for the following RR object: *** *** 10.spf1-test.mailzone.com. 47 IN TXT "v=spf1 mx -all" *** *** This object doesn't have a method "char_str_list". THIS IS A BUG *** IN THE CALLING SOFTWARE, which has incorrectly assumed that *** the object would be of a particular type. The calling *** software should check the type of each RR object before *** calling any of its methods. *** *** Net::DNS has returned undef to the caller. *** at blib/lib/Mail/SPF/Query.pm line 1319 | postmaster 10.spf1-test.mailzone.com DirectiveSet->new(): TXT query on 10.spf1-test.mailzone.com returned error=, last_dns_error=NOERROR | postmaster 10.spf1-test.mailzone.com DirectiveSet->new(): SPF policy: | postmaster 10.spf1-test.mailzone.com no SPF record found for 10.spf1-test.mailzone.com | postmaster 10.spf1-test.mailzone.com header_comment: spf_source = domain of 10.spf1-test.mailzone.com | postmaster 10.spf1-test.mailzone.com header_comment: spf_source_type = original-spf-record
[guest - Sat May 22 02:27:50 2004]: p.s. [root@window Mail-SPF-Query-1.997]# vi /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm package Net::DNS; # $Id: DNS.pm,v 1.48 2002/11/18 04:22:31 ctriv Exp $ (stock RHEL3 install) upgrading Net::DNS fixed it, but like it says, you've assumed something incorrect someplace still
| package Net::DNS; | # $Id: DNS.pm,v 1.48 2002/11/18 04:22:31 ctriv Exp $ That indicates Net::DNS version 0.31. In that version, Net::DNS::RR:: TXT did not feature the char_str_list() method yet, which is required by Mail::SPF::Query. However, M:S:Q 1.996 and later do formally require Net::DNS 0.46 through their Makefile.PLs, so I'm not sure how you managed to install M:S:Q 1.996 when only Net::DNS 0.31 was installed. So this issue should be resolved as of M:S:Q 1.996.
From: njh [...] bandsman.co.uk
Still happens even with the latest Net::DNS
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Fri, 23 Jun 2006 11:26:36 +0000
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Julian Mehnle <julian [...] mehnle.net>
Show quoted text
> Still happens even with the latest Net::DNS
With what version of Net::DNS? What does `grep 'DNS\.pm\|$VERSION =' $(locate Net/DNS.pm)` say? And `PAGER=echo perldoc -m Net::DNS`?
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Fri, 23 Jun 2006 11:29:26 +0000
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Julian Mehnle <julian [...] mehnle.net>
Oh, and with what version of Mail::SPF::Query? 1.999.1?
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Sat, 24 Jun 2006 11:54:13 +0100
To: Julian Mehnle <julian [...] mehnle.net>
From: Nigel Horne <njh [...] bandsman.co.uk>
Julian Mehnle wrote: Show quoted text
>> Still happens even with the latest Net::DNS
> > With what version of Net::DNS? > > What does `grep 'DNS\.pm\|$VERSION =' $(locate Net/DNS.pm)` say? And > `PAGER=echo perldoc -m Net::DNS`?
[njh@ns1 njh]$ grep 'DNS\.pm\|$VERSION =' $(locate Net/DNS.pm) /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm:# $Id: DNS.pm 570 2006-02-21 11:58:00Z olaf $ /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm: $VERSION = '0.57'; /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm:# $Id: DNS.pm,v 1.48 2002/11/18 04:22:31 ctriv Exp $ /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm:$VERSION = "0.31"; [njh@ns1 njh]$ PAGER=echo perldoc -m Net::DNS /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm [njh@ns1 njh]$ Show quoted text
> > And with what version of Mail::SPF::Query? 1.999.1?
[njh@ns1 njh]$ fgrep VERSION /usr/lib/perl5/site_perl/5.8.0/Mail/SPF/Query.pm our $VERSION = '1.999.1'; # fake version for EU::MM and CPAN $VERSION = '1.999001'; # real numerical version =head1 VERSION -Nigel -- Nigel Horne. Arranger, Adjudicator, Band Trainer, Composer, Tutor, Typesetter. NJH Music, Barnsley, UK. ICQ#20252325 njh@bandsman.co.uk http://www.bandsman.co.uk

Message body is not shown because sender requested not to inline it.

Show quoted text
> [njh@ns1 njh]$ grep 'DNS\.pm\|$VERSION =' $(locate Net/DNS.pm) > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm:#
$Id: DNS.pm 570 2006-02-21 11:58:00Z olaf $ Show quoted text
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm:
$VERSION = '0.57'; Show quoted text
> /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm:# $Id: DNS.pm,v 1.48 2002/
11/18 04:22:31 ctriv Exp $ Show quoted text
> /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm:$VERSION = "0.31"; > [njh@ns1 njh]$ PAGER=echo perldoc -m Net::DNS > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm
That's odd. You seem to have Net::DNS installed both as version 0.57 and 0.31, the latter of which would be too old, but your Perl prefers the 0.57 install, so the error should NOT occur. When you say "Still happens even with the latest Net::DNS", can you please give me the full error message that "still happens"?
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Sat, 24 Jun 2006 13:48:17 +0100
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Julian Mehnle via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=6381 > >
>> [njh@ns1 njh]$ grep 'DNS\.pm\|$VERSION =' $(locate Net/DNS.pm) >> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm:#
> $Id: DNS.pm 570 2006-02-21 11:58:00Z olaf $
>> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm:
> $VERSION = '0.57';
>> /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm:# $Id: DNS.pm,v 1.48 2002/
> 11/18 04:22:31 ctriv Exp $
>> /usr/lib/perl5/vendor_perl/5.8.0/Net/DNS.pm:$VERSION = "0.31"; >> [njh@ns1 njh]$ PAGER=echo perldoc -m Net::DNS >> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Net/DNS.pm
> > That's odd. You seem to have Net::DNS installed both as version 0.57 > and 0.31, the latter of which would be too old, but your Perl prefers > the 0.57 install, so the error should NOT occur. > > When you say "Still happens even with the latest Net::DNS", can you > please give me the full error message that "still happens"?
From /var/log/maillog (this is RHEL3) Jun 24 13:47:01 ns1 spamd[9474]: _***_*** WARNING!!! The program has attempted to call the method_*** "char_str_list" for the following RR object:_***_*** aol.com._58_IN_TXT_"spf2.0/pra ip4:152.163.225.0/24 ip4:205.188.139.0/24 ip4:205.188.144.0/24 ip4:205.188.156.0/23 ip4:205.188.159.0/24 ip4:64.12.136.0/23 ip4:64.12.138.0/24 ptr:mx.aol.com ?all"_***_*** This object doesn't have a method "char_str_list". THIS IS A BUG_*** IN THE CALLING SOFTWARE, which has incorrectly assumed that_*** the object would be of a particular type. The calling_*** software should check the type of each RR object before_*** calling any of its methods._***_*** Net::DNS has returned undef to the caller._***__ at /usr/lib/perl5/site_perl/5.8.0/Mail/SPF/Query.pm line 1277 -Nigel Horne -- Nigel Horne. Arranger, Adjudicator, Band Trainer, Composer, Tutor, Typesetter. NJH Music, Barnsley, UK. ICQ#20252325 njh@bandsman.co.uk http://www.bandsman.co.uk

Message body is not shown because sender requested not to inline it.

This is getting more obscure by the minute. Can you please insert the following lines in Mail/SPF/Query.pm right below line 1277 ("my @char_str_list = $answer->$method();")... if (@char_str_list == 1 and not defined($char_str_list[0])) { print(STDERR "DEBUG: Net::DNS::char_str_list() failed. Net::DNS version = ", Net::DNS->VERSION, ".", "\$answer = '$answer'\n" ); } ...and tell me what it says the next time the error occurs?
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Sat, 24 Jun 2006 18:04:51 +0100
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Julian Mehnle via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=6381 > > > This is getting more obscure by the minute. > > Can you please insert the following lines in Mail/SPF/Query.pm right > below line 1277 ("my @char_str_list = $answer->$method();")... > > if (@char_str_list == 1 and not defined($char_str_list[0])) { > print(STDERR > "DEBUG: Net::DNS::char_str_list() failed. Net::DNS version = ", > Net::DNS->VERSION, ".", > "\$answer = '$answer'\n" > ); > } > > ...and tell me what it says the next time the error occurs? >
I've done that, then restarted spamassassin. Where do the messages appear? I mean, where is STDERR at this point? -Nigel
On Sat Jun 24 13:06:01 2006, njh@bandsman.co.uk wrote: Show quoted text
> I've done that, then restarted spamassassin. Where do the messages > appear? I mean, where is STDERR at this point?
Wherever SA logs to. Most likely the same where the error message you reported is being logged. Is there reason to believe otherwise?
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Sat, 24 Jun 2006 18:27:44 +0100
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Julian Mehnle via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=6381 > > > On Sat Jun 24 13:06:01 2006, njh@bandsman.co.uk wrote: >
>> I've done that, then restarted spamassassin. Where do the messages >> appear? I mean, where is STDERR at this point? >>
> > Wherever SA logs to. Most likely the same where the error message you > reported is being logged. Is there reason to believe otherwise? >
The print statements do not appear in /var/log/maillog (which is where the other messages come from). That's not surprising since /var/log/maillog is where syslog calls go, not STDERR.
On Sat Jun 24 13:29:23 2006, njh@bandsman.co.uk wrote: Show quoted text
> The print statements do not appear in /var/log/maillog (which is where > the other messages come from). That's not surprising since > /var/log/maillog is where syslog calls go, not STDERR.
I seriously doubt that Net::DNS logs to syslog. However I'm not a SpamAssassin expert, so I don't understand why Net::DNS logging via Carp::carp() goes to syslog while printing to STDERR doesn't. Perhaps my test isn't correctly detecting the failure case. Please change the inserted lines to: print(STDERR "DEBUG: Net::DNS::char_str_list() called. Net::DNS version = ", Net::DNS->VERSION, ". ", "\$answer = '$answer'\n" ); It then should always generate a "DEBUG: ..." line. Of course only those that are generated immediately after the Net::DNS warning are relevant.
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Mon, 26 Jun 2006 11:18:18 +0100
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Show quoted text
> Perhaps my test isn't correctly detecting the failure case. Please > change the inserted lines to: > > print(STDERR > "DEBUG: Net::DNS::char_str_list() called. Net::DNS version = ", > Net::DNS->VERSION, ". ", > "\$answer = '$answer'\n" > ); > > It then should always generate a "DEBUG: ..." line. Of course only > those that are generated immediately after the Net::DNS warning are > relevant.
Done, though the only difference between that and the code your originally asked me to insert is that "." has been replaced by ". " -Nigel

Message body is not shown because sender requested not to inline it.

On Mon Jun 26 06:19:38 2006, njh@bandsman.co.uk wrote: Show quoted text
> Done, though the only difference between that and the code your > originally asked me to insert is that "." has been replaced by ". "
No. Look closely. The "if" frame is gone. (And the text message changed slightly, too.)
Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Mon, 26 Jun 2006 12:05:04 +0100
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Julian Mehnle via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=6381 > > > On Mon Jun 26 06:19:38 2006, njh@bandsman.co.uk wrote:
>> Done, though the only difference between that and the code your >> originally asked me to insert is that "." has been replaced by ". "
> > No. Look closely. The "if" frame is gone. (And the text message > changed slightly, too.)
Ahah, that wasn't clear from your message, I assumed you wanted to change the body of the "then" clause since there was no mention of the "if" line. If removed: my @char_str_list = $answer->$method(); print(STDERR "DEBUG: Net::DNS::char_str_list() called. Net::DNS version = ", Net::DNS->VERSION, ". ", "\$answer = '$answer'\n" ); # print "rr_method returning join of @char_str_list\n"; -Nigel

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Thu, 29 Jun 2006 12:30:29 +0100
To: bug-Mail-SPF-Query [...] rt.cpan.org
From: Nigel Horne <njh [...] bandsman.co.uk>
Here are the messages I am now seeing in /var/log/maillog after making your change: Jun 29 12:28:26 ns1 spamd[7644]: _***_*** WARNING!!! The program has attempted to call the method_*** "char_str_list" for the following RR object:_***_*** mackbc.com._3600_IN_TXT_"v=spf1 ip4:204.239.167.0/24 ip4:139.142.81.0/24 a mx ~all"_***_*** This object doesn't have a method "char_str_list". THIS IS A BUG_*** IN THE CALLING SOFTWARE, which has incorrectly assumed that_*** the object would be of a particular type. The calling_*** software should check the type of each RR object before_*** calling any of its methods._***_*** Net::DNS has returned undef to the caller._***__ at /usr/lib/perl5/site_perl/5.8.0/Mail/SPF/Query.pm line 1277 -Nigel

Message body is not shown because sender requested not to inline it.

On Thu Jun 29 07:31:04 2006, njh@bandsman.co.uk wrote: Show quoted text
> Here are the messages I am now seeing in /var/log/maillog after making > your change:
As, I'm sure, you are aware, this does not include the debug messages generated by the modified M:S:Q. You have to understand that I don't know your mail setup, and I know little about SpamAssassin in general nor the way you have configured it in particular. Please find out where STDERR is being logged to by the SpamAssassin process (are you using spamd and have you actually restarted it after modifying M:S:Q?).
Subject: RE: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Thu, 29 Jun 2006 16:55:44 +0100
To: <bug-Mail-SPF-Query [...] rt.cpan.org>
From: "Nigel Horne" <njh [...] bandsman.co.uk>
Show quoted text
> As, I'm sure, you are aware, this does not include the debug messages > generated by the modified M:S:Q. You have to understand that I don't > know your mail setup, and I know little about SpamAssassin in general > nor the way you have configured it in particular. Please find out where > STDERR is being logged to by the SpamAssassin process (are you using > spamd and have you actually restarted it after modifying M:S:Q?).
There is nothing non standard, it's all as per the Red Hat Spamassassin RPM, updated from the CPAN shell. I have changed nothing else.
On Thu Jun 29 11:56:33 2006, njh@bandsman.co.uk wrote: Show quoted text
> There is nothing non standard, it's all as per the Red Hat Spamassassin > RPM, updated from the CPAN shell. I have changed nothing else.
That's all very fine. But please read what I wrote. I know little about SpamAssassin. And for what it's worth, I know even less about Red Hat. So please try and answer the my questions, or I won't be able to research this issue. :-(
Subject: RE: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Thu, 29 Jun 2006 18:19:46 +0100
To: <bug-Mail-SPF-Query [...] rt.cpan.org>
From: "Nigel Horne" <njh [...] bandsman.co.uk>
I don't know how to answer your questions, because you imply that I have knowledge or have changed something where I haven't! I have just installed the software, got the error message, googled for it and noticed the claim that it was now fixed and thought you should be told that it isn't. I have done all you've asked of me, if you want any more help please let me know, but you don't seem to be able to state clearly what you want me to find out for you!
Subject: RE: [rt.cpan.org #6381] Net::DNS says you have a bug
Date: Thu, 29 Jun 2006 18:19:46 +0100
To: <bug-Mail-SPF-Query [...] rt.cpan.org>
From: "Nigel Horne" <njh [...] bandsman.co.uk>
I don't know how to answer your questions, because you imply that I have knowledge or have changed something where I haven't! I have just installed the software, got the error message, googled for it and noticed the claim that it was now fixed and thought you should be told that it isn't. I have done all you've asked of me, if you want any more help please let me know, but you don't seem to be able to state clearly what you want me to find out for you!
Does the problem still occur? If so, I'll repeat my questions in the hope that you can follow them: Please find out where STDERR is being logged to by the SpamAssassin process. Are you using spamd and have you actually restarted it after modifying M:S:Q?
I interpret the lack of response as an indication that the problem doesn't occur anymore with current releases. Closing.