Diff for perl-modules/Platon/Log/Mail/Postfix.pm between version 1.1 and 1.2
| version 1.1, 2004/10/21 17:37:49 |
version 1.2, 2004/10/21 18:28:55 |
|
|
| # 2004-10-19 - created |
# 2004-10-19 - created |
| # |
# |
| |
|
| # $Platon$ |
# $Platon: perl-modules/Platon/Log/Mail/Postfix.pm,v 1.1 2004/10/21 17:37:49 rajo Exp $ |
| |
|
| package Platon::Log::Mail::Postfix; |
package Platon::Log::Mail::Postfix; |
| |
|
|
|
| |
|
| if (( $xx->{created}, $xx->{host}, $xx->{log_level}, |
if (( $xx->{created}, $xx->{host}, $xx->{log_level}, |
| $xx->{process_name}, $xx->{pid}, $xx->{postfix_key}, $xx->{rest}) |
$xx->{process_name}, $xx->{pid}, $xx->{postfix_key}, $xx->{rest}) |
| = ($line =~ m#^(20[^ ]+) (\S+) \[(\S+)\] postfix/(\S+)\[(\d+)\]: (\S+) (.*)$#)) { |
= ($line =~ m/^(20[^ ]+) (\S+) \[(\S+)\] postfix\/(\S+)\[(\d+)\]: (\S+) (.*)$/o)) { |
| |
|
| $xx->{postfix_key} =~ s/:$//g; |
$xx->{postfix_key} =~ s/:$//g; |
| # postfix_key: connect disconnect warning fatal lost timeout refreshing terminating lost |
# postfix_key: connect disconnect warning fatal lost timeout refreshing terminating lost |
| if ($xx->{postfix_key} eq 'connect' or $xx->{postfix_key} eq 'disconnect') { |
if ($xx->{postfix_key} eq 'connect' or $xx->{postfix_key} eq 'disconnect') { |
| if (($xx->{client_hostname}, $xx->{client_ip}) = ($xx->{rest} =~ s#from\s+(\S+)\[([\.0-9]+)\]$##o)) { |
if ($xx->{rest} =~ s#from\s+(\S+)\[([\.0-9]+)\]$##o) { |
| |
($xx->{client_hostname}, $xx->{client_ip}) = ($1, $2); |
| return $self->_savelog($xx); |
return $self->_savelog($xx); |
| } |
} |
| else { |
else { |
Platon Group <platon@platon.org> http://platon.org/
|
|