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:
parent
d1599b3aaf
commit
a9f0538bcc
6
Changes
6
Changes
@ -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.
|
||||
|
||||
|
@ -5,6 +5,10 @@ use Qpsmtpd::Constants;
|
||||
@ISA = qw(Qpsmtpd::SMTP);
|
||||
use strict;
|
||||
|
||||
use POSIX ();
|
||||
|
||||
my $first_0;
|
||||
|
||||
sub start_connection {
|
||||
my $self = shift;
|
||||
|
||||
@ -20,7 +24,9 @@ sub start_connection {
|
||||
# things. So to be safe, cut them out.
|
||||
$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,
|
||||
remote_ip => $remote_ip,
|
||||
|
Loading…
Reference in New Issue
Block a user