[svn:qpsmtpd] r550 - in branches/0.31: . lib/Qpsmtpd

[email protected] 23 Sep 2005 19:16:37 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
Author: jpeacock
Date: Fri Sep 23 12:16:37 2005
New Revision: 550

Modified:
   branches/0.31/lib/Qpsmtpd/Transaction.pm
   branches/0.31/qpsmtpd
Log:
* lib/Qpsmtpd/Transaction.pm
  IO::File is buffering the message, so that the AV software doesn't get a
  a chance to scan anything when size_threshold > 0.

* qpsmtpd
  Apparently no one is running tcpserver any longer, since it wasn't loading
  the plugins anymore.

Modified: branches/0.31/lib/Qpsmtpd/Transaction.pm
==============================================================================
--- branches/0.31/lib/Qpsmtpd/Transaction.pm	(original)
+++ branches/0.31/lib/Qpsmtpd/Transaction.pm	Fri Sep 23 12:16:37 2005
@@ -90,13 +90,13 @@ sub body_current_pos {
 
 sub body_filename {
   my $self = shift;
-  $self->body_spool() unless $self->{_body_file};
+  $self->body_spool() unless $self->{_filename};
   return $self->{_filename};
 }
 
 sub body_spool {
   my $self = shift;
-  $self->log(LOGWARN, "spooling to disk");
+  $self->log(LOGINFO, "spooling message to disk");
   $self->{_filename} = $self->temp_file();
   $self->{_body_file} = IO::File->new($self->{_filename}, O_RDWR|O_CREAT, 0600)
     or die "Could not open file $self->{_filename} - $! "; # . $self->{_body_file}->error;
@@ -107,6 +107,7 @@ sub body_spool {
     $self->{_body_start} = $self->{_header_size};
   }
   $self->{_body_array} = undef;
+  $self->{_body_file}->close();
 }
 
 sub body_write {

Modified: branches/0.31/qpsmtpd
==============================================================================
--- branches/0.31/qpsmtpd	(original)
+++ branches/0.31/qpsmtpd	Fri Sep 23 12:16:37 2005
@@ -19,6 +19,7 @@ delete $ENV{ENV};
 $ENV{PATH} = '/bin:/usr/bin:/var/qmail/bin';
 
 my $qpsmtpd = Qpsmtpd::TcpServer->new();
+$qpsmtpd->load_plugins();
 $qpsmtpd->start_connection();
 $qpsmtpd->run();