don't call exit from the SMTP object, call the disconnect method instead

minor tweaks


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@203 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2004-02-13 13:10:18 +00:00
parent b095466c96
commit dfb763acdf

View File

@ -13,7 +13,6 @@ use Qpsmtpd::Constants;
use Mail::Address (); use Mail::Address ();
use Mail::Header (); use Mail::Header ();
use IPC::Open2;
#use Data::Dumper; #use Data::Dumper;
use POSIX qw(strftime); use POSIX qw(strftime);
use Net::DNS; use Net::DNS;
@ -291,7 +290,7 @@ sub help {
$self->respond(214, $self->respond(214,
"This is qpsmtpd " . $self->version, "This is qpsmtpd " . $self->version,
"See http://develooper.com/code/qpsmtpd/", "See http://develooper.com/code/qpsmtpd/",
'To report bugs or send comments, mail to <ask@perl.org>.'); 'To report bugs or send comments, mail to <ask@develooper.com>.');
} }
sub noop { sub noop {
@ -348,8 +347,9 @@ sub data {
while (<STDIN>) { while (<STDIN>) {
$complete++, last if $_ eq ".\r\n"; $complete++, last if $_ eq ".\r\n";
$i++; $i++;
$self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html"), exit $_ eq ".\n"
if $_ eq ".\n"; and $self->respond(451, "See http://develooper.com/code/qpsmtpd/barelf.html")
and $self->disconnect;
# add a transaction->blocked check back here when we have line by line plugin access... # add a transaction->blocked check back here when we have line by line plugin access...
unless (($max_size and $size > $max_size)) { unless (($max_size and $size > $max_size)) {
s/\r\n$/\n/; s/\r\n$/\n/;