| 123456789101112131415161718192021222324252627282930313233 |
- This patch makes Pflogsumm working with the particular format
- of the OSSP fsl based Postfix logfile.
- --- pflogsumm.pl.orig Wed Feb 19 23:36:07 2003
- +++ pflogsumm.pl Wed Mar 5 10:34:11 2003
- @@ -470,7 +470,7 @@
- next if(defined($dateStr) && ! /^$dateStr/o);
- s/: \[ID \d+\s+[^\]]+\] /: /o; # lose "[ID nnnnnn some.thing]" stuff
- unless((($msgMonStr, $msgDay, $msgTimeStr, $cmd, $qid) =
- - m#^(...)\s+(\d+)\s(..:..:..)\s\S+\s(?:vmailer|$syslogName)[-/]([^\[:]*).*?: ([^:]+)#o) == 5)
- + m#^(...)\s+(\d+)\s(..:..:..)\s\S+\s+\S+\s(?:vmailer|$syslogName)[-/]([^\[:]*).*?: ([^:]+)#o) == 5)
- {
- unless((($msgMonStr, $msgDay, $msgTimeStr, $cmd, $qid) =
- m#^(...)\s+(\d+)\s(..:..:..)\s\S+\s(vmailer|$syslogName[^\[:]*).*?: ([^:]+)#o) == 5)
- @@ -581,7 +581,7 @@
- @{$connTime{$1}} =
- ($msgYr, $msgMon + 1, $msgDay, $msgHr, $msgMin, $msgSec);
- } elsif(/: disconnect from /o) {
- - my ($pid, $hostID) = /\/smtpd\[(\d+)\]: disconnect from (.+)$/o;
- + my ($pid, $hostID) = /\/smtpd\[(\d+)\]: disconnect from (.+)$/o || next;
- if(exists($connTime{$pid})) {
- $hostID = gimme_domain($hostID);
- my($d, $h, $m, $s) = Delta_DHMS(@{$connTime{$pid}},
- @@ -1299,7 +1299,7 @@
- }
- my ($t_mday, $t_mon) = (localtime($time))[3,4];
-
- - return sprintf("%s %2d", $monthNames[$t_mon], $t_mday);
- + return sprintf("%s %02d", $monthNames[$t_mon], $t_mday);
- }
-
- # if there's a real domain: uses that. Otherwise uses the first
|