spamassassin-users October 2010 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: SA 3.3.1 and NetAddr::IP 4.034

Re: SA 3.3.1 and NetAddr::IP 4.034

From: Mark Martinec <Mark.Martinec+sa_at_nospam>
Date: Fri Oct 29 2010 - 15:01:16 GMT
To: users@spamassassin.apache.org

On Friday 29 October 2010 16:35:31 Mark Martinec wrote:
> > | Thu Oct 28 19:41:16 2010 michael [...] bizsystems.com
> >
> > fixed in release 4.035
>
> Actually ... maybe not fixed ... investigating

NetAddr::IP 4.035:

correct, this case is now fixed:
  $ perl -le 'use NetAddr::IP; print NetAddr::IP->new6("127.0.0.0/8")'
  0:0:0:0:0:0:7F00:0/104

still incorrect:
  $ perl -le 'use NetAddr::IP; print NetAddr::IP->new6("127/8")'
  0:0:0:0:0:0:7F00:0/8

A workaround for SpamAssassin is to avoid shorthand IPv4 network
specifications, both in a config file (trusted/internal networks,
if any), as well as the hardwired one:

--- Mail/SpamAssassin/Conf.pm~
+++ Mail/SpamAssassin/Conf.pm
@@ -3972,7 +3972,7 @@
 sub new_netset {
   my ($self) = @_;
   my $set = Mail::SpamAssassin::NetSet->new();
- $set->add_cidr ('127/8');
+ $set->add_cidr ('127.0.0.0/8');
   $set->add_cidr ('::1');
   return $set;
 }

Mark