From 4b11370c2ebcb9b5206501d99b27ff73ebf924eb Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 10 Jun 2018 20:20:51 +0200 Subject: [PATCH] spamassassin: add patches for newer Net::DNS versions. --- .../patches/net-dns-1.01-compat-uribl.patch | 27 +++++++++++++++++++ .../patches/net-dns-1.01-compat.patch | 14 ++++++++++ srcpkgs/spamassassin/template | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/spamassassin/patches/net-dns-1.01-compat-uribl.patch create mode 100644 srcpkgs/spamassassin/patches/net-dns-1.01-compat.patch diff --git a/srcpkgs/spamassassin/patches/net-dns-1.01-compat-uribl.patch b/srcpkgs/spamassassin/patches/net-dns-1.01-compat-uribl.patch new file mode 100644 index 0000000000..b33ffd817d --- /dev/null +++ b/srcpkgs/spamassassin/patches/net-dns-1.01-compat-uribl.patch @@ -0,0 +1,27 @@ +--- lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm 2015/04/28 20:36:05 1676616 ++++ lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm 2015/08/04 23:16:38 1694126 +@@ -942,9 +942,8 @@ + next unless (defined($str) && defined($dom)); + dbg("uridnsbl: got($j) NS for $dom: $str"); + +- if ($str =~ /IN\s+NS\s+(\S+)/) { +- my $nsmatch = lc $1; +- $nsmatch =~ s/\.$//; ++ if ($rr->type eq 'NS') { ++ my $nsmatch = lc $rr->nsdname; # available since at least Net::DNS 0.14 + my $nsrhblstr = $nsmatch; + my $fullnsrhblstr = $nsmatch; + +@@ -1025,9 +1024,9 @@ + } + dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str); + +- local $1; +- if ($str =~ /IN\s+A\s+(\S+)/) { +- $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $1); ++ if ($rr->type eq 'A') { ++ my $ip_address = $rr->rdatastr; ++ $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address); + } + } + } diff --git a/srcpkgs/spamassassin/patches/net-dns-1.01-compat.patch b/srcpkgs/spamassassin/patches/net-dns-1.01-compat.patch new file mode 100644 index 0000000000..9d12a1b1a9 --- /dev/null +++ b/srcpkgs/spamassassin/patches/net-dns-1.01-compat.patch @@ -0,0 +1,14 @@ +https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7223 + +--- lib/Mail/SpamAssassin/DnsResolver.pm 2015/07/20 18:23:18 1691991 ++++ lib/Mail/SpamAssassin/DnsResolver.pm 2015/07/20 18:24:48 1691992 +@@ -592,6 +592,9 @@ + }; + + if ($packet) { ++ # RD flag needs to be set explicitly since Net::DNS 1.01, Bug 7223 ++ $packet->header->rd(1); ++ + # my $udp_payload_size = $self->{res}->udppacketsize; + my $udp_payload_size = $self->{conf}->{dns_options}->{edns}; + if ($udp_payload_size && $udp_payload_size > 512) { diff --git a/srcpkgs/spamassassin/template b/srcpkgs/spamassassin/template index 8d1adb5aac..422af8ed20 100644 --- a/srcpkgs/spamassassin/template +++ b/srcpkgs/spamassassin/template @@ -1,7 +1,7 @@ # Template file for 'spamassassin' pkgname=spamassassin version=3.4.1 -revision=3 +revision=4 build_style=perl-module # Missing optional dependencies: # Mail::SPF, Geo::IP, Razor2, Encode::Detect, Net::Patricia