cvs commit: qpsmtpd/lib/Qpsmtpd TcpServer.pm
[email protected] (Ask "Bj?rn" Hansen)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/06/05 03:06:44
Modified: . Changes
lib/Qpsmtpd TcpServer.pm
Log:
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.
Revision Changes Path
1.68 +5 -1 qpsmtpd/Changes
Index: Changes
===================================================================
RCS file: /cvs/public/qpsmtpd/Changes,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -w -r1.67 -r1.68
--- Changes 24 May 2004 11:36:04 -0000 1.67
+++ Changes 5 Jun 2004 10:06:43 -0000 1.68
@@ -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.
1.10 +7 -1 qpsmtpd/lib/Qpsmtpd/TcpServer.pm
Index: TcpServer.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/TcpServer.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- TcpServer.pm 5 Mar 2004 12:46:23 -0000 1.9
+++ TcpServer.pm 5 Jun 2004 10:06:44 -0000 1.10
@@ -5,6 +5,10 @@
@ISA = qw(Qpsmtpd::SMTP);
use strict;
+use POSIX ();
+
+my $first_0;
+
sub start_connection {
my $self = shift;
@@ -20,7 +24,9 @@
# 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,