Mail archive
alpine-devel

[alpine-devel] SpamAssassin DNSBL tests fail after changes in perl (patch included)

From: Johan Dahlberg <johan_at_dnix.se>
Date: Wed, 17 Dec 2014 11:49:40 +0200

Hello,

With the update to 3.1 some changes in perl broke the dns resolving
capabilities of SpamAssassin.

Although the fault lies within SpamAssassin itself, and it should be on
their end to fix/update it. Still I created a patch that will let
SpamAssassin 3.4 use DNSBL and general dns lookups properly again.

I cant guarantee it solves all cases but it worked just fine here.

Johan


--- SpamAssassin/DnsResolver.pm.bak
+++ SpamAssassin/DnsResolver.pm
_at_@ -204,8 +204,10 @@
     _at_ns_addr_port = @{$self->{conf}->{dns_servers}};
     dbg("dns: servers set by config to: %s", join(', ',_at_ns_addr_port));
   } elsif ($res) { # default as provided by Net::DNS, e.g.
/etc/resolv.conf
- _at_ns_addr_port = map(untaint_var("[$_]:" . $res->{port}),
- _at_{$res->{nameservers}});
+ my _at_ns = $res->UNIVERSAL::can('nameservers') ? $res->nameservers
+ :
_at_{$res->{nameservers}};
+ my $port = $res->UNIVERSAL::can('port') ? $res->port :
$res->{port};
+ _at_ns_addr_port = map(untaint_var("[$_]:" . $port), @ns);
     dbg("dns: servers obtained from Net::DNS : %s", join(',
',_at_ns_addr_port));
   }
   return _at_ns_addr_port;


--uAKRQypu60I7Lcqm
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJUkVGyAAoJEAcoCTcJhy3fY5wQALc6b3fZzTZNM1g3RERHG7o+
+PJGe4EeYFfFE1nazo1ZpbBQGQOOnGEQlv+9FvF+HDZo5wAL+9IVgiym3Zm53NCD
sL2n/pwLpfm9oT/BpLwwlApxUwk408Tia1X6FKsyC/V+qmM91xj0gyoq+d2lFQVZ
Lx1haCIHYhX3B0qTqW1jrVg8MvEm2BCgwhoCLVKiNmNyJ2HDGeCP3Ds3m5qDYQ4Z
QrIMpoRPUCI/4iGVGW2tO6y3aMy6+b2IZJtejpM5uAa/DICmAi7oCZmP5FnXwiwM
d9Ns7YE9pHOqyoWkKb7H/sST7c+9MUWu0jeN/T/fTQYvwhI2g6I/xazSxF4pMKfD
DgIr9HoR0fXK4zDagXVlgUhm3mBoEl8YoQwRHY0xgT9OG3s1r8uEgbf+13i7psDe
TN1BDzKn0fKA9ci03bO3k1R0I/JqX9jTa6QsTRoPzSvIQfndw1rTqf+9wacTlGTn
JLI6gXoPUn9wk9WC34WbRSUU4qBw33zH6GRH/Vmzz0a+DtRhihqhJcKC2hdFxgS3
qmQ1QT65+t8xNlSTTpUki51+oYgZCbNLzug/OK739IhzlOXppWRadc9mbgBx27ho
FWQngspemieo6+Dik3usqy6grNPsalJb0Tm5IFASBiybXKTezZZTcWb5We5iUmtW
upmom8gfN0ojvXLpbOXS
=s9QA
-----END PGP SIGNATURE-----

--uAKRQypu60I7Lcqm--


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Wed Dec 17 2014 - 11:49:40 GMT