MS, postfix, and MIME attachments

Mariano Absatz mailscanner at LISTS.COM.AR
Fri May 2 20:04:00 IST 2003


El 2 May 2003 a las 17:14, Julian Field escribió:

> >
> >I will continue investigating in and around CopyEntireMessage.
> 
> Fixed in 4.20-2.
> 
> Mariano --- You might want to check the CopyEntireMessage function in your
> ZMailer code. I think it suffers the same problem.

Indeed... since in this case, apparently Postfix code inherited our ZMailer 
mistakes :-)

I won't have time to test this until Monday, but this patch (which simply 
copies your code) should do, since it is calling already working functions...

*** ZMDiskStore.pm.old  Tue Apr 22 16:32:32 2003
--- ZMDiskStore.pm      Fri May  2 15:48:20 2003
***************
*** 321,331 ****
    my $this = shift;
    my($message, $targetdir, $targetfile) = @_;
  
!   my $hdfile = $this->{hdpath};
  
!   #system($global::cp . " \"$hdfile\" \"$targetdir/$$this{tname}\"");
!   rename("$hdfile", "$targetdir/$$this{hdname}");
!   #my 
$hdoutpath=MailScanner::Sendmail::HDOutFileName($targetdir/$$this{tname});
  }
  
  
--- 321,345 ----
    my $this = shift;
    my($message, $targetdir, $targetfile) = @_;
  
!   #my $hdfile = $this->{hdpath};
!   #rename("$hdfile", "$targetdir/$$this{hdname}");
  
! # BBY we were moving instead of copying... now we copy(cat)
! # BBY Julian's higher level solution that is much clearer
! # BBY and storeentireasdfqf means "include envelope" which
! # BBY is quite reasonable
! 
!   #print STDERR "Copying to $targetdir $targetfile\n";
!   if (MailScanner::Config::Value('storeentireasdfqf')) {
!     #print STDERR "Copying to dir $targetdir\n";
!     $this->CopyToDir($targetdir);
!   } else {
!     #print STDERR "Copying to file $targetdir/$targetfile\n";
!     my $target = new IO::File "$targetdir/$targetfile", "w";
!     MailScanner::Log::WarnLog("writing to $targetdir/$targetfile: $!")
!       if not defined $target;
!     $this->WriteEntireMessage($message, $target);
!   }
  }




--
Mariano Absatz
El Baby
----------------------------------------------------------
Bisexuality immediately doubles your chances for
a date on Saturday night.
        -- Woody Allen




More information about the MailScanner mailing list