[packages/exim-surbl] Release 5. Don't treat blacklisted queries as listed entries.
arekm
arekm at pld-linux.org
Thu Apr 29 14:44:42 CEST 2021
commit 50b0db85a09e75f3821893c157ee8dce4c530584
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Apr 29 14:44:07 2021 +0200
Release 5. Don't treat blacklisted queries as listed entries.
ip-meaning.patch | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
---
diff --git a/ip-meaning.patch b/ip-meaning.patch
new file mode 100644
index 0000000..4b57b47
--- /dev/null
+++ b/ip-meaning.patch
@@ -0,0 +1,41 @@
+diff -urN exim_surbl-2.3.org/exim_surbl.pl exim_surbl-2.3/exim_surbl.pl
+--- exim_surbl-2.3.org/exim_surbl.pl 2021-04-29 14:20:06.491533142 +0200
++++ exim_surbl-2.3/exim_surbl.pl 2021-04-29 14:29:08.875363883 +0200
+@@ -116,6 +116,10 @@
+ # If gethostbyname() returned anything, build a return message.
+ $return_string = "";
+ if (scalar(@dnsbladdr) != 0) {
++ if (inet_ntoa($dnsbladdr[0]) eq "127.0.0.1") {
++ # query blacklisted
++ return "";
++ }
+ $return_string = "Blacklisted URL in message. (".$params[0].") in";
+ @surblipaddr = unpack('C4',($dnsbladdr[4])[0]);
+ if ($surblipaddr[3] & 64) {
+@@ -152,6 +156,10 @@
+ if (scalar(@dnsbladdr) != 0) {
+ $return_string = "Blacklisted URL in message. (".$params[0].") in";
+ @ipaddr = unpack('C4',($dnsbladdr[0])[0]);
++ if ($ipaddr[3] & 1) {
++ # query blocked
++ return "";
++ }
+ if ($ipaddr[3] & 8) {
+ $return_string .= " [red]";
+ }
+@@ -175,6 +183,15 @@
+ # If gethostbyname() returned anything, build a return message.
+ $return_string = "";
+ if (scalar(@dnsbladdr) != 0) {
++ my $ip = inet_ntoa($dnsbladdr[0]);
++ if ($ip eq "127.0.1.255") {
++ # query blocked
++ return "";
++ }
++ if (substr($ip, 0, length("127.0.1.")) ne "127.0.1.") {
++ # non blocked meaning of ip
++ return "";
++ }
+ $return_string = "Blacklisted URL in message: ".$params[0];
+ $return_string .= ". See http://www.spamhaus.org/lookup.lasso?dnsbl=domain.";
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/exim-surbl.git/commitdiff/50b0db85a09e75f3821893c157ee8dce4c530584
More information about the pld-cvs-commit
mailing list