X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from dukat.ath.forthnet.gr (dukat.ath.forthnet.gr [193.92.181.203]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 70D5FDC003D for ; Mon, 22 Dec 2014 17:05:36 +0000 (UTC) Received: from dukat.ath.forthnet.gr (minerva.dnix.se [127.0.0.1]) by dukat.ath.forthnet.gr (Postfix) with ESMTP id 4A7D3A6B for ; Mon, 22 Dec 2014 19:02:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dnix.se; h=date :from:to:subject:message-id:references:content-type:in-reply-to; s=dnix; bh=ijqXNXJpLrkvgs7gtZk+yaKuy6JTUqfvZJ3EdZmNfXw=; b=cR0Q SLFh5NxoCXRIzd0fesxt4aO0/Vrz+0RSEH2ERMRex4+MTVAAQ0qEf2ig+BXywanr oSkjOOPtBjxA8EAw+xJhav85QCt2strwXMn8fdANz8qfeJImvrVjzrdsatKNiqed Iknj3y8gEu6r/ZMQ4scmMeZtgjTX4nY1zXTMZP8WG+htC+fmFMWbA7T67tFCXrhx b3lyklzHttaRpjJc+CkdgvLE8dgQWV7eVc7pnxmIeK1KiP162/jHpBU7HBtfeL8J I+zlNoEh/dIO9aPypSp6cNT9kOr7P7wHIUXzFhWt67A2cUTOgLPWQhTnwc6V7Eee CD5jsTkbHH+urFcqag== Date: Mon, 22 Dec 2014 19:05:29 +0200 From: Johan Dahlberg To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] SpamAssassin DNSBL tests fail after changes in perl (patch included) Message-ID: <20141222170528.GA1926@einstein.local> References: <20141217094939.GA7838@einstein.local> <1419264733.22778.8.camel@df1844j> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <1419264733.22778.8.camel@df1844j> User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --St7VIuEGZ6dlpu13 Content-Type: multipart/mixed; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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->nameservers > > + : > > @{$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 Hello, I'm not so used to working with git, but I think the attached patch is correct. Johan --cNdxnHkX5QqsyA0e Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="sa-dns-fix.patch" diff --git a/lib/Mail/SpamAssassin/DnsResolver.pm.orig b/lib/Mail/SpamAssassin/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 = @{$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 = map(untaint_var("[$_]:" . $res->{port}), - @{$res->{nameservers}}); + my @ns = $res->UNIVERSAL::can('nameservers') ? $res->nameservers + : @{$res->{nameservers}}; + my $port = $res->UNIVERSAL::can('port') ? $res->port : $res->{port}; + @ns_addr_port = map(untaint_var("[$_]:" . $port), @ns); dbg("dns: servers obtained from Net::DNS : %s", join(', ',@ns_addr_port)); } return @ns_addr_port; --cNdxnHkX5QqsyA0e-- --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJUmE9YAAoJEAcoCTcJhy3fxKsP/i8Pgb8imdMYD+GjE2JDHaFE Hv5TBO5Pv00kZemsmSo1qpp4xBIvoJz3xXSlTy+MQeD3G2zkEDLgaPE6AjqMu07Y XtdNVrBiSD46B6/r9niC0ubwwuGQpehSSqTu0ml9FZctvTNwq2Gz2fJ7m5oGZ8Lz W1tYL6SkXqmR2oFCwBEJrgs88TqM2vrmc9p+npUS2SGPJt6VMFCXZmAcOz6n5bXG I4v27bDccksOgT9XwyPhm/irQ1zDnf043hI3gQXZoUhgui3HtQCUtJlMzv14SDm9 ntMtNcpL5Ak/yQ2/aRmIsOytgLEOjbMjfcl/lLlaNeotsnLMAZhNDxMBGe1JHXEZ 9njb+y4Hu2/8yHRYPuL7B+5sYzLSYJH8c4KiKOI1Lcx0vxNgrVeEJCwDIgWEDJu5 n592T0UTQoszDmK8BUCO2Gxbo0rgaCB8Oq/X+7xHcPyMJAG2/7mKcGHDZ2EPaJz1 zPBsqYHFMomn3xCeOAyZhuVjjweQfNPeSp/cJ4laehGdEwnITMp5DSnfywCALeON vfJrmqgJEJLPo9W+nIzMl/7Zg+4PdzdeXNplMAnGWVpJclG4CIOKWKLOERZMmCs0 hQbutWWZ9d9Jvwpn1ukCCr1kW4nFhXuzku7+nIRVwUD+94xk6PR3P9TJoLUgGriZ UBIFpJBs4hTxSDisf62W =qqXc -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---