Re: lastest uribl plugin

[email protected] ("Jared Johnson")
Newsgroups perl.qpsmtpd
Message-ID <[email protected]>
Specifically regarding the quoted-printable stuff.. my diff must have been
off an older version.  This is probably a better representation of your
changes:

@@ -574,15 +574,22 @@
     my $line;
     my @qp_continuations;
     while ( $line = $txn->body_getline ) {
+        chomp $line;
         if ( $line =~ /(.*)=$/ ) {
             push @qp_continuations, $1;
             next;
         } elsif ( @qp_continuations ) {
-            $line = join '', @qp_continuations, $line;
+            $line = join '', @qp_continuations, $1;
             @qp_continuations = ();
         }
         $self->find_uris($line);
     }
+    if ( @qp_continuations ) {
+        $self->log(LOGINFO, "uribl: WARNING: scan_body exiting with line
continuations left.  Bad Email?");
+        $line = join('', @qp_continuations, $line);
+        @qp_continuations = ();
+        $self->find_uris($line);
+    }
 }

The first and last change should certainly go in, but what about this:


         if ( $line =~ /(.*)=$/ ) {
             push @qp_continuations, $1;
             next;
         } elsif ( @qp_continuations ) {
-            $line = join '', @qp_continuations, $line;
+            $line = join '', @qp_continuations, $1;
             @qp_continuations = ();
         }

Won't $1 only be defined when the condition in the 'if' is met, thus
making your change equivalent to:

$line = join '', $qp_continuations;

I'm not sure but it seems like that change doesn't belong..

-Jared
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.