You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2018/10/25 07:39:45 UTC

svn commit: r1844811 - /spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm

Author: hege
Date: Thu Oct 25 07:39:45 2018
New Revision: 1844811

URL: http://svn.apache.org/viewvc?rev=1844811&view=rev
Log:
Do not resolve things unless is_dns_available()

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm?rev=1844811&r1=1844810&r2=1844811&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm Thu Oct 25 07:39:45 2018
@@ -494,6 +494,8 @@ sub check_uri_local_bl {
     dbg("check: uri_local_bl evaluating rule %s\n", $test);
   }
 
+  my $dns_available = $permsg->is_dns_available();
+
   while (my ($raw, $info) = each %uri_detail) {
 
     next unless $info->{hosts};
@@ -510,6 +512,10 @@ sub check_uri_local_bl {
       }
 
       if($host !~ /^$IP_ADDRESS$/) {
+       if (!$dns_available) {
+         dbg("check: uri_local_bl skipping $host, dns not available");
+         next;
+       }
        # this would be best cached from prior lookups
        @addrs = gethostbyname($host);
        # convert to string values address list