I had some problems with the uribl plugin:
- Always returning "pass, No URIs found in mail"
- URLs split over lines causing lookups to truncated domains
- Whitelist not being actioned ( for the second "while ($l =~ m{" loop )


I've made some changes that work for me, but it likely needs reviewing from those with more knowledge:

--- a/plugins/uribl
+++ b/plugins/uribl
@@ -271,6 +271,7 @@

         if ($l =~ /(.*)=$/) {
             push @qp_continuations, $1;
+            next;
         }
         elsif (@qp_continuations) {
             $l = join('', @qp_continuations, $l);
@@ -404,10 +405,13 @@
               ? 3
               : 2;
             if (
-                exists $self->{whitelist_zones}
- ->{join('.', @host_domains[($cutoff - 1) .. $#host_domains])})
+                exists $self->{whitelist_zones}->{
+                    join('.',
+                         @host_domains[($#host_domains - $cutoff + 1)
+                           .. $#host_domains])
+                }
+               )
             {
-
$self->log(LOGINFO, "Skipping whitelist URI domain '$host'");
             }
             else {
@@ -498,7 +502,7 @@
     return \@matches;
 }

-sub hook_data {
+sub hook_data_post {
     my ($self, $transaction) = @_;

     return DECLINED if $self->is_immune();

Reply via email to