Diff for perl-modules/Platon/Log/Mail/Postfix.pm between version 1.11 and 1.12
| version 1.11, 2005/12/04 21:33:45 |
version 1.12, 2008/08/01 15:58:06 |
|
|
| # 2004-10-19 - created |
# 2004-10-19 - created |
| # |
# |
| |
|
| # $Platon: perl-modules/Platon/Log/Mail/Postfix.pm,v 1.10 2004/12/09 18:09:53 rajo Exp $ |
# $Platon: perl-modules/Platon/Log/Mail/Postfix.pm,v 1.11 2005-12-04 21:33:45 rajo Exp $ |
| |
|
| package Platon::Log::Mail::Postfix; |
package Platon::Log::Mail::Postfix; |
| |
|
|
|
| { # {{{ |
{ # {{{ |
| my ($self, $line) = @_; |
my ($self, $line) = @_; |
| my $xx = { }; |
my $xx = { }; |
| my $length = 24; |
my $length = 25; |
| |
|
| if ($line !~ m/^20/o) { |
if ($line !~ m/^20/o) { |
| $length = 15; |
$length = 16; |
| } |
} |
| my $time = str2time(substr($line, 0, $length)); |
my $time_str = substr($line, 0, $length); |
| |
my $time = str2time($time_str); |
| $xx->{created} = time2str('%Y-%m-%dT%X%z', $time); |
$xx->{created} = time2str('%Y-%m-%dT%X%z', $time); |
| #print 'input = "' , substr($line, 0, $length) , '" output = "' , $xx->{created}, "\"\n"; |
#print 'input = "' , substr($line, 0, $length) , '" output = "' , $xx->{created}, "\"\n"; |
| $line = substr($line, $length); |
$line = substr($line, $length); |
| |
|
| #return 1; |
|
| return 0 unless defined($xx->{created}); |
return 0 unless defined($xx->{created}); |
| |
|
| # first separate hostname |
# first separate hostname |
Platon Group <platon@platon.org> http://platon.org/
|
|