RE: Net::DNS problem?

2005-06-22 Thread Matthew.van.Eerde
Rosenbaum, Larry M. wrote:
> According to Camel book 2nd edition page 39,
> 
> "The underscore only works within literal numbers specified in your
> program, not for strings functioning as numbers or data read from
> somewhere else."
> 
> I suspect that when Perl processes rule files, the scores are not
> processed like "literal numbers".
> 
> L

Bingo

perl -e "for (@ARGV) { print $_, qq(\t), 1 * $_, qq(\n); }" 1 1.2 1.2_3
1   1
1.2 1.2
1.2_3   1.2

Note the last... 1.2_3 is numified as 1.2

-- 
Matthew.van.Eerde (at) hbinc.com 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"


RE: Net::DNS problem?

2005-06-22 Thread Rosenbaum, Larry M.
According to Camel book 2nd edition page 39, 

"The underscore only works within literal numbers specified in your
program, not for strings functioning as numbers or data read from
somewhere else."

I suspect that when Perl processes rule files, the scores are not
processed like "literal numbers".

L

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Posted At: Tuesday, June 21, 2005 5:22 PM
> Posted To: sa-users
> Conversation: Net::DNS problem?
> Subject: RE: Net::DNS problem?
> 
> Irina wrote:
> > I decided to downgrade it by downloading TAR.  Installed
> > prerequisites and the module itself just fine.
> >
> > Running spamassassin --lint and see the complaint about version of
it
> > is not numeric (0.49_03), therefore it can not compare 2 versions
> > Argument "0.49_03" isn't numeric in numeric lt (<) at
> > /usr/local/lib/perl5/site_perl/5.8.6/Mail/SpamAssassin/Dns.pm line
> > 1230
> 
> But 0.49_03 IS numeric.  Perl allows embedded _'s in numeric literals.
> 
> Even if you put it in quotes - "0.49_03" - it's STILL numeric.
> 
> perl -e "print 1 if 1 < 1.2_3"
> 1
> 
> perl -e "print 1 if 1 < '1.2_3'"
> 1
> 
> --
> Matthew.van.Eerde (at) hbinc.com 805.964.4554 x902
> Hispanic Business Inc./HireDiversity.com Software Engineer
> perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"


Re: Net::DNS problem?

2005-06-21 Thread Bookworm

[EMAIL PROTECTED] wrote:


Irina wrote:
 


I decided to downgrade it by downloading TAR.  Installed
prerequisites and the module itself just fine.

Running spamassassin --lint and see the complaint about version of it
is not numeric (0.49_03), therefore it can not compare 2 versions
   Argument "0.49_03" isn't numeric in numeric lt (<) at
/usr/local/lib/perl5/site_perl/5.8.6/Mail/SpamAssassin/Dns.pm line
1230 
   



But 0.49_03 IS numeric.  Perl allows embedded _'s in numeric literals.

Even if you put it in quotes - "0.49_03" - it's STILL numeric.

perl -e "print 1 if 1 < 1.2_3"
1

perl -e "print 1 if 1 < '1.2_3'"
1

 

I ran across this as well, I'd have to dig a bit to find the exact 
reference, but one of the perl modules that's used by the spamassassin 
CPAN compile actually spits out the error - not perl itself. 
I think it was one of the Test:: sub modules.  Might have been 
Digest::MD5, however.  (I did it three days ago, and I didn't write down 
which one was related to it)


BW


Re: Net::DNS problem?

2005-06-21 Thread Loren Wilton
> But 0.49_03 IS numeric.  Perl allows embedded _'s in numeric literals.
>
> Even if you put it in quotes - "0.49_03" - it's STILL numeric.
>
> perl -e "print 1 if 1 < 1.2_3"
> 1
>
> perl -e "print 1 if 1 < '1.2_3'"
> 1

This seems to be a problem with some internal perl statement parser and the
way the developer declared the version number as a string.  There is a fair
thtread about it over on the dev list.

The result seems to be benign, other than the annoying warning message.

Loren



Re: Net::DNS problem?

2005-06-21 Thread Irina
Hmmm, I wonder why it complained with 0.49_03 and was ok when I left 0.49
only.

Irina
===

- Original Message - 
From: <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, June 21, 2005 5:22 PM
Subject: RE: Net::DNS problem?


Irina wrote:
> I decided to downgrade it by downloading TAR.  Installed
> prerequisites and the module itself just fine.
>
> Running spamassassin --lint and see the complaint about version of it
> is not numeric (0.49_03), therefore it can not compare 2 versions
> Argument "0.49_03" isn't numeric in numeric lt (<) at
> /usr/local/lib/perl5/site_perl/5.8.6/Mail/SpamAssassin/Dns.pm line
> 1230

But 0.49_03 IS numeric.  Perl allows embedded _'s in numeric literals.

Even if you put it in quotes - "0.49_03" - it's STILL numeric.

perl -e "print 1 if 1 < 1.2_3"
1

perl -e "print 1 if 1 < '1.2_3'"
1

-- 
Matthew.van.Eerde (at) hbinc.com 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"




RE: Net::DNS problem?

2005-06-21 Thread Matthew.van.Eerde
Irina wrote:
> I decided to downgrade it by downloading TAR.  Installed
> prerequisites and the module itself just fine.
> 
> Running spamassassin --lint and see the complaint about version of it
> is not numeric (0.49_03), therefore it can not compare 2 versions
> Argument "0.49_03" isn't numeric in numeric lt (<) at
> /usr/local/lib/perl5/site_perl/5.8.6/Mail/SpamAssassin/Dns.pm line
> 1230 

But 0.49_03 IS numeric.  Perl allows embedded _'s in numeric literals.

Even if you put it in quotes - "0.49_03" - it's STILL numeric.

perl -e "print 1 if 1 < 1.2_3"
1

perl -e "print 1 if 1 < '1.2_3'"
1

-- 
Matthew.van.Eerde (at) hbinc.com 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"


Re: Net::DNS problem?

2005-06-21 Thread Irina


I decided to downgrade it by downloading TAR.  Installed prerequisites and
the module itself just fine.

Running spamassassin --lint and see the complaint about version of it is not
numeric (0.49_03), therefore it can not compare 2 versions
Argument "0.49_03" isn't numeric in numeric lt (<) at
/usr/local/lib/perl5/site_perl/5.8.6/Mail/SpamAssassin/Dns.pm line 1230

Here is the line:
$Net::DNS::VERSION < 0.34

I overwrote $Net::DNS::VERSION with 0.49 - so does not complain anymore
:-)))

Trying to figure out if this version is working.  And don't see any of SURBL
inside scores :-


Irina


- Original Message - 
From: "email builder" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, June 21, 2005 4:18 PM
Subject: Re: Net::DNS problem?


> All,
>
> I also ran into this problem:
>
> > 0.51 has already been released that addresses the overlooked debug
> > statement  (http://www.net-dns.org/).I still get failures in
> > the "11-escapedchars.t" test under Solaris-8/Perl-5.8.6 though.
>
> I contacted the author and he said it's fixed in SVN:
>
> "I fixed this bug about 2 days ago. If you need it quickly you can use
> the SVN repository.
>
> svn co http://www.net-dns/svn/net-dns/trunk
>
> I plan do post  a developers release this week. 0.51_02 that will
> contain the fix."
>
>
>
>
>
> 
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
> http://football.fantasysports.yahoo.com
>




Re: Net::DNS problem?

2005-06-21 Thread email builder
All,

I also ran into this problem:

> 0.51 has already been released that addresses the overlooked debug
> statement  (http://www.net-dns.org/).I still get failures in
> the "11-escapedchars.t" test under Solaris-8/Perl-5.8.6 though.

I contacted the author and he said it's fixed in SVN:

"I fixed this bug about 2 days ago. If you need it quickly you can use  
the SVN repository.

svn co http://www.net-dns/svn/net-dns/trunk

I plan do post  a developers release this week. 0.51_02 that will  
contain the fix."





 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


Re: Net::DNS problem?

2005-06-10 Thread Tim Rosmus
On Fri, 10 Jun 2005, Justin Mason wrote:

|# btw, have you reported this to the Net::DNS maintainers?
|# it'd be good to fix this upstream (as I don't think there's
|# much we can do inside SpamAssassin).
|# 

0.51 has already been released that addresses the overlooked debug
statement  (http://www.net-dns.org/).I still get failures in
the "11-escapedchars.t" test under Solaris-8/Perl-5.8.6 though.
-- 
Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
  Northwest Nexus Inc.


Re: Net::DNS problem?

2005-06-10 Thread Justin Mason
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


btw, have you reported this to the Net::DNS maintainers?
it'd be good to fix this upstream (as I don't think there's
much we can do inside SpamAssassin).

- --j.

Tim Rosmus writes:
> On Fri, 10 Jun 2005, E. Falk wrote:
> 
> |# I should mention that I cannot determine the source of this problem 
> exactly,
> |# but if I ran "make test" on 0.50 the "escapedchar" tests failed. If I went
> |# ahead and installed it anyway, I got the remote addr struc errors unless I
> |# told SpamAssassin that dns was not available (not a good option since it
> |# meant I couldn't use SURBL!)
> |# 
> |# So I looked at the changelog to figure out when these escapedchar tests 
> were
> |# put in, and it appeared to be pretty recent. Regressing to 0.48 seemed to 
> do
> |# be far enough back to get rid of those tests and now everything works.
> |# 
> |# > > scanhub02:~ # spamassassin --lint
> |# > > ;; remote addr struc: 02357f01
> 
> Here's what I did for this
> 
> *** lib/Net/DNS/Resolver/Base.pm.orig   Fri Jun 10 09:33:33 2005
> --- lib/Net/DNS/Resolver/Base.pmFri Jun 10 09:33:53 2005
> ***
> *** 1059,1065 
>   
>   
> print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};
> !   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n";
>   
> foreach my $socket (@socket){
> next if !defined $socket;
> --- 1059,1065 
>   
>   
> print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};
> !   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n" if 
> $self->{'debug'};
>   
> foreach my $socket (@socket){
> next if !defined $socket;
> 
> As for the "escapedchar" tests, this also failed for me under Solaris
> but worked under Alpha NetBSD 2.02.   I installed it anyway and all
> is running fine.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFCqcdEMJF5cimLx9ARAlQ5AJwOr9GZSLlQz0/nqDBeYnmrEmqXwQCfXlk2
xNy4CdhybvB7N8wF0IfAECI=
=LQ40
-END PGP SIGNATURE-



Re: Net::DNS problem?

2005-06-10 Thread E. Falk
Interesting... I checked the Base.pm file for 0.48 and that line doesn't 
exist. I guess the failed tests were just a coincidence, and I ended up 
doing the right thing for the wrong reasons. :)


Evan


Tim Rosmus wrote:



Here's what I did for this

*** lib/Net/DNS/Resolver/Base.pm.orig   Fri Jun 10 09:33:33 2005
--- lib/Net/DNS/Resolver/Base.pmFri Jun 10 09:33:53 2005
***
*** 1059,1065 
  
  
print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};

!   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n";
  
foreach my $socket (@socket){

next if !defined $socket;
--- 1059,1065 
  
  
print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};

!   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n"
if $self->{'debug'};
  
foreach my $socket (@socket){

next if !defined $socket;


As for the "escapedchar" tests, this also failed for me under Solaris
but worked under Alpha NetBSD 2.02.   I installed it anyway and all
is running fine.


Re: Net::DNS problem?

2005-06-10 Thread Tim Rosmus
On Fri, 10 Jun 2005, E. Falk wrote:

|# I should mention that I cannot determine the source of this problem exactly,
|# but if I ran "make test" on 0.50 the "escapedchar" tests failed. If I went
|# ahead and installed it anyway, I got the remote addr struc errors unless I
|# told SpamAssassin that dns was not available (not a good option since it
|# meant I couldn't use SURBL!)
|# 
|# So I looked at the changelog to figure out when these escapedchar tests were
|# put in, and it appeared to be pretty recent. Regressing to 0.48 seemed to do
|# be far enough back to get rid of those tests and now everything works.
|# 
|# > > scanhub02:~ # spamassassin --lint
|# > > ;; remote addr struc: 02357f01

Here's what I did for this

*** lib/Net/DNS/Resolver/Base.pm.orig   Fri Jun 10 09:33:33 2005
--- lib/Net/DNS/Resolver/Base.pmFri Jun 10 09:33:53 2005
***
*** 1059,1065 
  
  
print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};
!   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n";
  
foreach my $socket (@socket){
next if !defined $socket;
--- 1059,1065 
  
  
print ";; bgsend($ns_address : $dstport)\n" if $self->{'debug'};
!   print ";; remote addr struc: ".unpack("H*", $dst_sockaddr)."\n" if 
$self->{'debug'};
  
foreach my $socket (@socket){
next if !defined $socket;


As for the "escapedchar" tests, this also failed for me under Solaris
but worked under Alpha NetBSD 2.02.   I installed it anyway and all
is running fine.
-- 
Tim Rosmus <[EMAIL PROTECTED]>
   Postmaster / USENET / DNS
  Northwest Nexus Inc.


Re: Net::DNS problem?

2005-06-10 Thread E. Falk

A slightly more detailed explanation -

I should mention that I cannot determine the source of this problem 
exactly, but if I ran "make test" on 0.50 the "escapedchar" tests 
failed. If I went ahead and installed it anyway, I got the remote addr 
struc errors unless I told SpamAssassin that dns was not available (not 
a good option since it meant I couldn't use SURBL!)


So I looked at the changelog to figure out when these escapedchar tests 
were put in, and it appeared to be pretty recent. Regressing to 0.48 
seemed to do be far enough back to get rid of those tests and now 
everything works.


Evan

E. Falk wrote:

I *just* finished fixing exact problem this on my own machine.

The issue is indeed with Net-DNS 0.50. Remove it and install 0.48 and 
all your troubles will go away.


Evan

Rolf Kraeuchi wrote:


Hi!

I just upgraded one of our Gateway (scan)servers from SA 2.61 to 3.04
(System is SuSE Linux Enterprise9/i386, SA invoked by amavisd-new
2.3.1).

Can anybody explain me the following message:

--
scanhub02:~ # spamassassin --lint
;; remote addr struc: 02357f01
--

Goggle did not really help, besides that I suspect this message is 
generated by the Net::DNS module (installed Net-DNS-0.50).


Now if I do *not* set 'dns_available yes' in local.cf:

-
spamassassin -D --lint
[...]
debug: is Net::DNS::Resolver available? yes
debug: Net::DNS version: 0.50
debug: trying (3) comcast.net...
debug: looking up NS for 'comcast.net'
debug: NS lookup of comcast.net failed horribly => Perhaps your 
resolv.conf isn't pointing at a valid server?
debug: All NS queries failed => DNS unavailable (set dns_available to 
override)

debug: is DNS available? 0
[...]
-

Of course resolv.conf points to a valid nameserver...

Any help appreciated.

regards,
-- rolf



Re: Net::DNS problem?

2005-06-10 Thread E. Falk

I *just* finished fixing exact problem this on my own machine.

The issue is indeed with Net-DNS 0.50. Remove it and install 0.48 and 
all your troubles will go away.


Evan

Rolf Kraeuchi wrote:

Hi!

I just upgraded one of our Gateway (scan)servers from SA 2.61 to 3.04
(System is SuSE Linux Enterprise9/i386, SA invoked by amavisd-new
2.3.1).

Can anybody explain me the following message:

--
scanhub02:~ # spamassassin --lint
;; remote addr struc: 02357f01
--

Goggle did not really help, besides that I suspect this message is 
generated by the Net::DNS module (installed Net-DNS-0.50).


Now if I do *not* set 'dns_available yes' in local.cf:

-
spamassassin -D --lint
[...]
debug: is Net::DNS::Resolver available? yes
debug: Net::DNS version: 0.50
debug: trying (3) comcast.net...
debug: looking up NS for 'comcast.net'
debug: NS lookup of comcast.net failed horribly => Perhaps your 
resolv.conf isn't pointing at a valid server?
debug: All NS queries failed => DNS unavailable (set dns_available to 
override)

debug: is DNS available? 0
[...]
-

Of course resolv.conf points to a valid nameserver...

Any help appreciated.

regards,
-- rolf