Don't keep adding ip addresses to the process status line ($0) when running under PPerl.

Include the date and time the session started in the process status line.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@233 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2004-06-05 10:06:44 +00:00
parent d1599b3aaf
commit a9f0538bcc
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,8 @@
0.28 0.28 - 2004/06/05
Don't keep adding ip addresses to the process status line ($0) when running under PPerl.
Include the date and time the session started in the process status line.
Added a "queue/maildir" plugin for writing incoming mails to a maildir. Added a "queue/maildir" plugin for writing incoming mails to a maildir.

View File

@ -5,6 +5,10 @@ use Qpsmtpd::Constants;
@ISA = qw(Qpsmtpd::SMTP); @ISA = qw(Qpsmtpd::SMTP);
use strict; use strict;
use POSIX ();
my $first_0;
sub start_connection { sub start_connection {
my $self = shift; my $self = shift;
@ -20,7 +24,9 @@ sub start_connection {
# things. So to be safe, cut them out. # things. So to be safe, cut them out.
$remote_host =~ tr/a-zA-Z\.\-0-9//cd; $remote_host =~ tr/a-zA-Z\.\-0-9//cd;
$0 = "$0 [$remote_ip : $remote_host]"; $first_0 = $0 unless $first_0;
my $now = POSIX::strftime("%H:%M:%S %Y-%m-%d", localtime);
$0 = "$first_0 [$remote_ip : $remote_host : $now]";
$self->SUPER::connection->start(remote_info => $remote_info, $self->SUPER::connection->start(remote_info => $remote_info,
remote_ip => $remote_ip, remote_ip => $remote_ip,