pflogsumm.patch 1.1 KB

123456789101112131415161718192021222324252627
  1. This patch makes Pflogsumm working with the particular format
  2. of the OSSP fsl based Postfix logfile.
  3. --- pflogsumm.pl.orig Tue Jun 17 17:59:57 2003
  4. +++ pflogsumm.pl Tue Jun 24 11:41:59 2003
  5. @@ -498,8 +498,8 @@
  6. s/: \[ID \d+\s+[^\]]+\] /: /o; # lose "[ID nnnnnn some.thing]" stuff
  7. my $logRmdr;
  8. ($msgMonStr, $msgDay, $msgTimeStr, $logRmdr) = /^(...)\s+(\d+)\s(..:..:..)\s\S+\s(.+)$/o;
  9. - unless((($cmd, $qid) = $logRmdr =~ m#^(?:vmailer|postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
  10. - (($cmd, $qid) = $logRmdr =~ m#^((?:vmailer|postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
  11. + unless((($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+(?:vmailer|postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
  12. + (($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+((?:vmailer|postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
  13. {
  14. #print UNPROCD "$_";
  15. next;
  16. @@ -1324,7 +1324,7 @@
  17. }
  18. my ($t_mday, $t_mon) = (localtime($time))[3,4];
  19. - return sprintf("%s %2d", $monthNames[$t_mon], $t_mday);
  20. + return sprintf("%s %02d", $monthNames[$t_mon], $t_mday);
  21. }
  22. # if there's a real domain: uses that. Otherwise uses the first