* 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
This commit is contained in:
John Peacock 2005-09-23 19:16:37 +00:00
parent 4b3fdf50bd
commit b808a139cf
2 changed files with 4 additions and 2 deletions

View File

@ -90,13 +90,13 @@ sub body_current_pos {
sub body_filename { sub body_filename {
my $self = shift; my $self = shift;
$self->body_spool() unless $self->{_body_file}; $self->body_spool() unless $self->{_filename};
return $self->{_filename}; return $self->{_filename};
} }
sub body_spool { sub body_spool {
my $self = shift; my $self = shift;
$self->log(LOGWARN, "spooling to disk"); $self->log(LOGINFO, "spooling message to disk");
$self->{_filename} = $self->temp_file(); $self->{_filename} = $self->temp_file();
$self->{_body_file} = IO::File->new($self->{_filename}, O_RDWR|O_CREAT, 0600) $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; 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_start} = $self->{_header_size};
} }
$self->{_body_array} = undef; $self->{_body_array} = undef;
$self->{_body_file}->close();
} }
sub body_write { sub body_write {

View File

@ -19,6 +19,7 @@ delete $ENV{ENV};
$ENV{PATH} = '/bin:/usr/bin:/var/qmail/bin'; $ENV{PATH} = '/bin:/usr/bin:/var/qmail/bin';
my $qpsmtpd = Qpsmtpd::TcpServer->new(); my $qpsmtpd = Qpsmtpd::TcpServer->new();
$qpsmtpd->load_plugins();
$qpsmtpd->start_connection(); $qpsmtpd->start_connection();
$qpsmtpd->run(); $qpsmtpd->run();