X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id C8471DC006A for ; Thu, 25 Dec 2014 09:55:23 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id x12so12812772wgg.39 for ; Thu, 25 Dec 2014 01:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; bh=nEaB3X895wm17/4Ea0aw90x6mxAOEcywbKFI3uY1B2I=; b=p4j6ZsFOVzDPC8VezY3hIJ9omT7kzsCH0dI6sZ454QswqPgqu7wjrEH6dYSurNeKVW EcL+9HndudD8lteSPbEk03QV+P1WO1DC2sRPna935XpTxTB0czl1uW3uEzEIl37PERKt AvGx7K+mHH0RIPPNnrUcP3PgEbz6OoiQU61pgVvJWuYZsiBG+EV4dMzoBuJ7DRQVs/9H YfH6g8vUvPRIV5eoV3aEWWpK0hihuqXb+bF5f5xY8Wi3JhijTuyIQD4hlKPZO76Mh9Eo 7hjQnEUn/ivdxASH+iV72OqDJin9hx9hw+oCDPRfO4PCFehprE7uFfIPkbCFyuDPv0Hy zK6Q== X-Received: by 10.180.20.6 with SMTP id j6mr57873477wie.59.1419501322497; Thu, 25 Dec 2014 01:55:22 -0800 (PST) Received: from [10.44.65.254] (93-57-120-162.ip164.fastwebnet.it. [93.57.120.162]) by mx.google.com with ESMTPSA id be4sm24164571wib.16.2014.12.25.01.55.21 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 25 Dec 2014 01:55:21 -0800 (PST) Message-ID: <1419501308.23192.30.camel@df1844j> Subject: Re: [alpine-devel] SpamAssassin DNSBL tests fail after changes in perl (patch included) From: Leonardo Arena To: Johan Dahlberg Cc: alpine-devel@lists.alpinelinux.org Date: Thu, 25 Dec 2014 10:55:08 +0100 In-Reply-To: <20141222191107.GA3763@einstein.local> References: <20141217094939.GA7838@einstein.local> <1419264733.22778.8.camel@df1844j> <20141222170528.GA1926@einstein.local> <20141222191107.GA3763@einstein.local> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-3TvXGHJqzoiqeOhCYPw9" X-Mailer: Evolution 3.10.4-0ubuntu2 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 --=-3TvXGHJqzoiqeOhCYPw9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On lun, 2014-12-22 at 21:11 +0200, Johan Dahlberg wrote: > On Mon, 22 Dec 2014 at 19:05:29, Johan Dahlberg wrote: > > On Mon, 22 Dec 2014 at 17:12:13, Leonardo Arena wrote: > > > On mer, 2014-12-17 at 11:49 +0200, Johan Dahlberg wrote: > > > > --- SpamAssassin/DnsResolver.pm.bak > > > > +++ SpamAssassin/DnsResolver.pm > > > > @@ -204,8 +204,10 @@ > > > > @ns_addr_port =3D @{$self->{conf}->{dns_servers}}; > > > > dbg("dns: servers set by config to: %s", join(', > > > > ',@ns_addr_port)); > > > > } elsif ($res) { # default as provided by Net::DNS, e.g. > > > > /etc/resolv.conf > > > > - @ns_addr_port =3D map(untaint_var("[$_]:" . $res->{port}), > > > > - @{$res->{nameservers}}); > > > > + my @ns =3D $res->UNIVERSAL::can('nameservers') ? $res->nameser= vers > > > > + : > > > > @{$res->{nameservers}}; > > > > + my $port =3D $res->UNIVERSAL::can('port') ? $res->port : > > > > $res->{port}; > > > > + @ns_addr_port =3D map(untaint_var("[$_]:" . $port), @ns); > > > > dbg("dns: servers obtained from Net::DNS : %s", join(', > > > > ',@ns_addr_port)); > > > > } > > > > return @ns_addr_port; > > >=20 > > >=20 > > > Hi, > > > thanks for your contribution. > > > Would it be possible to have a GIT patch? It would be easier and 100% > > > error-free to apply. > > > Thanks! > > >=20 > > > R, > > > leo > >=20 > > Hello, I'm not so used to working with git, but I think the attached > > patch is correct. > >=20 > > Johan >=20 > > diff --git a/lib/Mail/SpamAssassin/DnsResolver.pm.orig b/lib/Mail/SpamA= ssassin/DnsResolver.pm > > index 41ae81c..fdc1e5e 100644 > > --- a/lib/Mail/SpamAssassin/DnsResolver.pm.orig > > +++ b/lib/Mail/SpamAssassin/DnsResolver.pm > > @@ -204,8 +204,10 @@ sub configured_nameservers { > > @ns_addr_port =3D @{$self->{conf}->{dns_servers}}; > > dbg("dns: servers set by config to: %s", join(', ',@ns_addr_port))= ; > > } elsif ($res) { # default as provided by Net::DNS, e.g. /etc/resol= v.conf > > - @ns_addr_port =3D map(untaint_var("[$_]:" . $res->{port}), > > - @{$res->{nameservers}}); > > + my @ns =3D $res->UNIVERSAL::can('nameservers') ? $res->nameservers > > + : @{$res->{nameserver= s}}; > > + my $port =3D $res->UNIVERSAL::can('port') ? $res->port : $res->{po= rt}; > > + @ns_addr_port =3D map(untaint_var("[$_]:" . $port), @ns); > > dbg("dns: servers obtained from Net::DNS : %s", join(', ',@ns_addr= _port)); > > } > > return @ns_addr_port; >=20 >=20 >=20 >=20 > I took some time to figure out git a bit so I guess the following > attached patch is more accurate(?). >=20 > Regards, > Johan Thanks. I applied it to edge, can you please check that it works as expected? Then I can backport it to 3.1-stable. For future patches it would be nice to have a GIT patch against aports tree. It would be more straightforward to apply them. Thanks! - leo --=-3TvXGHJqzoiqeOhCYPw9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJUm978AAoJELAPckZGG2T6PQAH/jLzoqfwD0xUqmlLb4c53tZE 0QWEbkTIBpNlXhd5OM3Vv7hKM+SQKRKGsxNUQvCW8sU8UXrK2BsMEWTJqbQqcwpr 3v+DzLpo8P2bjRZT38Ihdan35iOPrt2BjB1Nvk8GaB7MzMrbX/ix7b1YDv0i1BQe GovbW68CgKN1CAVprrguh1Merf2W/pH9FelQzZ7zvnIOS4WP+8Mbv+U3tp6G4D59 xRyO3bfahS1rfkuELxsC2iEj152YTokWSoXp810Hfi5XqvkiVH5f3YSi3mKoIG8Q oScUuewr1HgWdypniqB/JeeHskHckCzsk3kNqCN/HUN1PwZCRJnVQmY+M7j3/Aw= =1JQR -----END PGP SIGNATURE----- --=-3TvXGHJqzoiqeOhCYPw9-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---