From b808a139cff925a13b3764ff7346df9d69f30fa9 Mon Sep 17 00:00:00 2001 From: John Peacock Date: Fri, 23 Sep 2005 19:16:37 +0000 Subject: [PATCH] * 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. git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@550 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/Transaction.pm | 5 +++-- qpsmtpd | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd/Transaction.pm b/lib/Qpsmtpd/Transaction.pm index 7221ecd..d8829e1 100644 --- a/lib/Qpsmtpd/Transaction.pm +++ b/lib/Qpsmtpd/Transaction.pm @@ -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 { diff --git a/qpsmtpd b/qpsmtpd index 254458e..092cd3a 100755 --- a/qpsmtpd +++ b/qpsmtpd @@ -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();