The AV scanner plugin I am currently using (uvscan) requires the attached patch so that it can scan the existing temp file, rather than making a copy just for the scan.

John
Index: lib/Qpsmtpd/Transaction.pm
===================================================================
--- lib/Qpsmtpd/Transaction.pm  (revision 464)
+++ lib/Qpsmtpd/Transaction.pm  (working copy)
@@ -66,6 +66,11 @@
   $self->{_notes}->{$key};
 }

+sub body_filename {
+  my $self = shift;
+  return unless $self->{_body_file};
+  return $self->{_filename};
+}

 sub body_write {
   my $self = shift;
@@ -201,6 +206,11 @@
 example on a C<RSET> or after C<DATA> completes, so you might want to
 use the notes field in the C<Qpsmtpd::Connection> object instead.

+=head2 body_filename ( )
+
+Returns the temporary filename used to store the message contents; useful for
+virus scanners so that an additional copy doesn't need to be made.
+
 =head2 body_write( $data )

 Write data to the end of the email.


Reply via email to