spamassassin: add patches for newer Net::DNS versions.
This commit is contained in:
parent
5d5ace8738
commit
4b11370c2e
3 changed files with 42 additions and 1 deletions
27
srcpkgs/spamassassin/patches/net-dns-1.01-compat-uribl.patch
Normal file
27
srcpkgs/spamassassin/patches/net-dns-1.01-compat-uribl.patch
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
srcpkgs/spamassassin/patches/net-dns-1.01-compat.patch
Normal file
14
srcpkgs/spamassassin/patches/net-dns-1.01-compat.patch
Normal file
|
@ -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) {
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'spamassassin'
|
# Template file for 'spamassassin'
|
||||||
pkgname=spamassassin
|
pkgname=spamassassin
|
||||||
version=3.4.1
|
version=3.4.1
|
||||||
revision=3
|
revision=4
|
||||||
build_style=perl-module
|
build_style=perl-module
|
||||||
# Missing optional dependencies:
|
# Missing optional dependencies:
|
||||||
# Mail::SPF, Geo::IP, Razor2, Encode::Detect, Net::Patricia
|
# Mail::SPF, Geo::IP, Razor2, Encode::Detect, Net::Patricia
|
||||||
|
|
Loading…
Reference in a new issue