spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felic...@apache.org
Subject svn commit: rev 53898 - in spamassassin/branches/3.0: lib/Mail/SpamAssassin/Plugin rules
Date Wed, 06 Oct 2004 20:06:08 GMT
Author: felicity
Date: Wed Oct  6 13:06:07 2004
New Revision: 53898

Modified:
   spamassassin/branches/3.0/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
   spamassassin/branches/3.0/rules/25_uribl.cf
Log:
bug 3805: add the ability to whitelist (not query) the URIBLs for certain domains.  added
the top list (125 or so) from SURBL for queried domains that they whitelist.

Modified: spamassassin/branches/3.0/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
==============================================================================
--- spamassassin/branches/3.0/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm	(original)
+++ spamassassin/branches/3.0/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm	Wed Oct  6 13:06:07
2004
@@ -76,6 +76,12 @@
 
 The maximum number of domains to look up.
 
+=item uridnsbl_skip_domain domain1 domain2 ...
+
+Specify a domain, or a number of domains, which should be skipped for the
+URIBL checks.  This is very useful to specify very common domains which are
+not going to be listed in URIBLs.
+
 =back
 
 =cut
@@ -126,6 +132,7 @@
   # set default config settings
   $samain->{conf}->{uridnsbl_timeout} =		3;
   $samain->{conf}->{uridnsbl_max_domains} =	20;
+  $samain->{conf}->{uridnsbl_skip_domains} =	{};
   return $self;
 }
 
@@ -178,7 +185,14 @@
   my %domlist = ( );
   foreach my $uri ($scanner->get_uri_list()) {
     my $dom = Mail::SpamAssassin::Util::uri_to_domain($uri);
-    if ($dom) { $domlist{$dom} = 1; }
+    if ($dom) {
+      if (exists $scanner->{main}->{conf}->{uridnsbl_skip_domains}->{$dom}) {
+        dbg("URIDNSBL: found domain $dom in skip list");
+      }
+      else {
+        $domlist{$dom} = 1;
+      }
+    }
   }
 
   # trim down to a limited number - pick randomly
@@ -255,6 +269,12 @@
     $opts->{conf}->{uridnsbl_timeout} = $opts->{value};
     $self->inhibit_further_callbacks(); return 1;
   }
+  elsif ($key eq 'uridnsbl_skip_domain') {
+    foreach my $domain (split(/\s+/, $opts->{value})) {
+      $opts->{conf}->{uridnsbl_skip_domains}->{lc $domain} = 1;
+    }
+    $self->inhibit_further_callbacks(); return 1;
+  }
   return 0;
 }
 
@@ -335,8 +355,7 @@
   if ($dom =~ /^\d+\.\d+\.\d+\.\d+$/) { 
     $self->lookup_dnsbl_for_ip ($scanstate, $obj, $dom);
   }
-  else
-  {
+  else {
     # look up the domain in the RHSBL subset
     my $cf = $scanstate->{active_rules_rhsbl};
     foreach my $rulename (keys %{$cf}) {

Modified: spamassassin/branches/3.0/rules/25_uribl.cf
==============================================================================
--- spamassassin/branches/3.0/rules/25_uribl.cf	(original)
+++ spamassassin/branches/3.0/rules/25_uribl.cf	Wed Oct  6 13:06:07 2004
@@ -63,4 +63,31 @@
 describe	URIBL_AB_SURBL	Contains an URL listed in the AB SURBL blocklist
 tflags		URIBL_AB_SURBL	net
 
+# Top 125 domains whitelisted by SURBL
+uridnsbl_skip_domain yahoo.com w3.org msn.com com.com yimg.com
+uridnsbl_skip_domain hotmail.com doubleclick.net flowgo.com ebaystatic.com aol.com
+uridnsbl_skip_domain akamai.net yahoogroups.com ebay.com classmates.com akamaitech.net
+uridnsbl_skip_domain incredimail.com tiscali.co.uk google.com chtah.com ediets.com
+uridnsbl_skip_domain directtrack.com microsoft.com paypal.com jexiste.fr amazon.com
+uridnsbl_skip_domain nytimes.com unitedoffers.com sitesolutions.it m0.net hyperpc.co.jp
+uridnsbl_skip_domain terra.com.br macromedia.com ed10.net earthlink.net citibank.com
+uridnsbl_skip_domain sourceforge.net marketwatch.com comcast.net messagelabs.com mcafee.com
+uridnsbl_skip_domain grisoft.com geocities.com yourfreedvds.com smileycentral.com ual.com
+uridnsbl_skip_domain monster.com e-trend.co.jp cnn.com cnet.com bfi0.com
+uridnsbl_skip_domain atdmt.com sportsline.com rs6.net rr.com redhat.com
+uridnsbl_skip_domain partner2profit.com joingevalia.com hotbar.com advertising.com topica.com
+uridnsbl_skip_domain rm04.net ed4.net dsbl.org extm.us edgesuite.net
+uridnsbl_skip_domain debian.org click-url.com bbc.co.uk adobe.com gte.net
+uridnsbl_skip_domain go.com weatherbug.com speedera.net sbcglobal.net ientrymail.com
+uridnsbl_skip_domain ibm.com att.net apple.com 5iantlavalamp.com verizon.net
+uridnsbl_skip_domain plaxo.com pandasoftware.com p0.com mediaplex.com gmail.com
+uridnsbl_skip_domain exacttarget.com constantcontact.com sf.net roving.com netflix.com
+uridnsbl_skip_domain moveon.org cc-dt.com xmr3.com spamcop.net postdirect.com
+uridnsbl_skip_domain norman.com netatlantic.com mail.com investorplace.com hitbox.com
+uridnsbl_skip_domain citizensbank.com chase.com bridgetrack.com apache.org washingtonpost.com
+uridnsbl_skip_domain si.com shockwave.com sears.com quickinspirations.com prserv.net
+uridnsbl_skip_domain mac.com myweathercheck.com dsi-enews.net cheaptickets.com bravenet.com
+uridnsbl_skip_domain arcamax.com afa.net 4at1.com yahoo.co.uk uclick.com
+uridnsbl_skip_domain suntrust.com sun.com ups.com pcmag.com mycomicspage.com
+
 endif	# Mail::SpamAssassin::Plugin::URIDNSBL

Mime
View raw message