cvs commit: qpsmtpd/lib/Qpsmtpd TcpServer.pm

[email protected] (Devin Carraway)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/07/31 23:56:33

  Modified:    lib/Qpsmtpd TcpServer.pm
  Log:
  Log the connecting client hostname/address, rather than waiting for the
  SMTP greeting.
  
  Revision  Changes    Path
  1.11      +2 -1      qpsmtpd/lib/Qpsmtpd/TcpServer.pm
  
  Index: TcpServer.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/TcpServer.pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -r1.10 -r1.11
  --- TcpServer.pm	5 Jun 2004 10:06:44 -0000	1.10
  +++ TcpServer.pm	1 Aug 2004 06:56:33 -0000	1.11
  @@ -18,6 +18,7 @@
       my $remote_host = $ENV{TCPREMOTEHOST} || ( $ENV{TCPREMOTEIP} ? "[$ENV{TCPREMOTEIP}]" : "[noip!]");
       my $remote_info = $ENV{TCPREMOTEINFO} ? "$ENV{TCPREMOTEINFO}\@$remote_host" : $remote_host;
       my $remote_ip   = $ENV{TCPREMOTEIP};
  +    $self->log(LOGNOTICE, "Connection from $remote_info [$remote_ip]");
   
       # if the local dns resolver doesn't filter it out we might get
       # ansi escape characters that could make a ps axw do "funny"
  @@ -67,7 +68,7 @@
     my ($self, $code, @messages) = @_;
     while (my $msg = shift @messages) {
       my $line = $code . (@messages?"-":" ").$msg;
  -    $self->log(LOGDEBUG, "$line");
  +    $self->log(LOGDEBUG, $line);
       print "$line\r\n" or ($self->log(LOGERROR, "Could not print [$line]: $!"), return 0);
     }
     return 1;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.