From e10bb78cd3e96f979210f68e9dce87c5ceba59b4 Mon Sep 17 00:00:00 2001 From: Robert Spier Date: Sat, 27 Nov 2004 06:38:32 +0000 Subject: [PATCH] - modify some comments about timeouts - remove extraneous pid's from log messages git-svn-id: https://svn.perl.org/qpsmtpd/trunk@346 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/SMTP.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index ffc58b7..d38bacb 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -18,8 +18,10 @@ use Mail::Header (); use POSIX qw(strftime); use Net::DNS; -# $SIG{ALRM} = sub { respond(421, "Game over pal, game over. You got a -# timeout; I just can't wait that long..."); exit }; +# this is only good for forkserver +# can't set these here, cause forkserver resets them +#$SIG{ALRM} = sub { respond(421, "Game over pal, game over. You got a timeout; I just can't wait that long..."); exit }; +#$SIG{ALRM} = sub { warn "Connection Timed Out\n"; exit; }; sub new { my $proto = shift; @@ -33,7 +35,6 @@ sub new { my (%commands); @commands{@commands} = ('') x @commands; # this list of valid commands should probably be a method or a set of methods $self->{_commands} = \%commands; - $self; } @@ -233,7 +234,7 @@ sub mail { ($from) = "<" . ($from_parameter =~ m/^from:\s*(\S+)/i)[0] . ">" unless $from; - $self->log(LOGWARN, "$$ from email address : [$from]"); + $self->log(LOGWARN, "from email address : [$from]"); if ($from eq "<>" or $from =~ m/\[undefined\]/) { $from = Qpsmtpd::Address->new("<>"); @@ -284,7 +285,7 @@ sub rcpt { my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0]; $rcpt = $_[1] unless $rcpt; - $self->log(LOGWARN, "$$ to email address : [$rcpt]"); + $self->log(LOGWARN, "to email address : [$rcpt]"); $rcpt = (Qpsmtpd::Address->parse($rcpt))[0]; return $self->respond(501, "could not parse recipient") unless $rcpt;