Current Cambridge patchset [LONG]

Mariano Absatz mailscanner at LISTS.COM.AR
Wed Jul 30 15:42:32 IST 2003


I didn't pay much attention, but it seemed quite trivial (once Tony did it, 
of course), but if you need a hand with the ZMailer part, just let me know.

El 30 Jul 2003 a las 14:39, Julian Field escribió:

> I have incorporated this feature into the main code.
> Very good idea Tony!
> 
> At 11:34 30/07/2003, you wrote:
> >Tony Finch <dot at DOTAT.AT> wrote:
> > >
> > >EximDiskStore.pm, PFDiskStore.pm, SMDiskStore.pm, ZMSiskStore.pm,
> > >SA.pm, Message.pm:
> > >
> > >        Instead of not scanning large messages, SpamAssassin scans
> > >        only the first part of messages up to the Max SpamAssassin Size
> > >        configuration.
> >
> >Ooops, I screwed that part up. Revised patch:
> >
> >
> >--- SMDiskStore.pm      4 Jul 2003 18:08:28 -0000       1.1.1.7
> >+++ SMDiskStore.pm      30 Jul 2003 10:25:33 -0000      1.15
> >@@ -285,15 +286,15 @@
> >  # Passed a ref to the array.
> >  sub ReadBody {
> >    my $this = shift;
> >-  my($body) = @_;
> >-  my($dh) = $this->{indhandle};
> >+  my($body,$max) = @_;
> >+  my $size = 0;
> >+  my $dh = $this->{indhandle};
> >
> >    seek($dh, 0, 0); # Rewind the file
> >-
> >-  while(<$dh>) {
> >-    # End of line characters are already there, so don't add them
> >-    #push @{$body}, $_ . "\n";
> >-    push @{$body}, $_;
> >+  my $line;
> >+  while(defined($line = <$dh>) and $size < $max) {
> >+    push @{$body}, $line;
> >+    $size += length $line;
> >    }
> >  }
> >
> >
> >
> >--- EximDiskStore.pm    13 May 2003 17:32:25 -0000      1.1.1.5
> >+++ EximDiskStore.pm    30 Jul 2003 10:25:33 -0000      1.15
> >@@ -320,8 +321,8 @@
> >  # Passed a ref to the array.
> >  sub ReadBody {
> >    my $this = shift;
> >-  my($body) = @_;
> >-
> >+  my($body,$max) = @_;
> >+  my $size = 0;
> >    my $dh = $this->{indhandle};
> >
> >    seek($dh, 0, 0); # Rewind the file
> >@@ -329,10 +330,9 @@
> >    my $line = <$dh>;
> >    # FIXME: check that id is correct here
> >
> >-  while(<$dh>) {
> >-    # End of line characters are already there, so don't add them
> >-    #push @{$body}, $_ . "\n";
> >-    push @{$body}, $_;
> >+  while(defined($line = <$dh>) and $size < $max) {
> >+    push @{$body}, $line;
> >+    $size += length $line;
> >    }
> >  }
> >
> >
> >Tony.
> >--
> >f.a.n.finch  <dot at dotat.at>  http://dotat.at/
> >CROMARTY FORTH TYNE: NORTHERLY 4 OR 5 BECOMING VARIABLE 3 THEN SOUTHERLY 4 OR
> >5. SHOWERS. MODERATE WITH FOG PATCHES.
> 
> --
> Julian Field
> www.MailScanner.info
> MailScanner thanks transtec Computers for their support


--
Mariano Absatz
El Baby
----------------------------------------------------------
It is now proved beyond doubt that smoking is one
of the leading causes of statistics.
        -- Fletcher Knebel




More information about the MailScanner mailing list