diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 3370e4b..6144152 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -98,7 +98,7 @@ sub start_conversation { sub transaction { my $self = shift; use Data::Dumper; - warn Data::Dumper->Dump([\$self], [qw(self)]); + #warn Data::Dumper->Dump([\$self], [qw(self)]); return $self->{_transaction} || ($self->{_transaction} = Qpsmtpd::Transaction->new()); } @@ -240,6 +240,24 @@ sub version { $Qpsmtpd::VERSION; } +sub noop { + my $self = shift; + warn Data::Dumper->Dump([\$self], [qw(self)]); + $self->respond(250, "OK"); + +} + +sub vrfy { + shift->respond(252, "Just try sending a mail and we'll see how it turns out ..."); +} + +sub rset { + my $self = shift; + $self->{_transaction} = undef; + $self->transaction->start(); + $self->respond(250, "OK"); +} + sub quit { my $self = shift; $self->respond(221, $self->config('me') . " closing connection. Have a wonderful day"); diff --git a/qpsmtpd b/qpsmtpd index 5499b82..ffb4cee 100755 --- a/qpsmtpd +++ b/qpsmtpd @@ -18,9 +18,6 @@ $| = 1; delete $ENV{ENV}; $ENV{PATH} = '/var/qmail/bin'; -use vars qw($TRACE); -$TRACE = 5; - # should this be ->new ? my $qpsmtpd = Qpsmtpd::TcpServer->new(); $qpsmtpd->start_connection(); @@ -141,20 +138,6 @@ sub data { return 1; } -sub rset { - $state{transaction} = {}; - respond(250, "OK"); -} - -sub noop { - respond(250, "OK"); -} - -sub vrfy { - respond(252, "Just try sending a mail and we'll see how it turns out ..."); -} - - sub check_rhsbl { my ($rhsbl, $host) = @_; return 0 unless $host;