Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 144236

Summary: net-mail/pflogsumm does not support postfix 2.3 logs
Product: Gentoo Linux Reporter: crywolf
Component: Current packagesAssignee: Andrej Kacian (RETIRED) <ticho>
Status: RESOLVED FIXED    
Severity: normal CC: net-mail+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description crywolf 2006-08-17 12:21:59 UTC
When used against postfix 2.3 logs, pflogsumm reports 0 delivered messages.  Upstream has not updated.  Below is a patch (stolen from FreeBSD ports) which makes pflogsumm parse postfix 2.3 logs correctly.

--- pflogsumm.pl.orig           Fri Dec 12 06:40:19 2003
+++ pflogsumm.pl                Mon Jul 31 19:25:43 2006
@@ -696,7 +696,7 @@
            }
        }
        elsif((($addr, $relay, $delay, $status, $toRmdr) = $logRmdr =~
-               /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), status=(\S+)(.*)$/o) >= 4)
+               /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), (?:conn_use=[^,]+, )?delay=([^,]+), (?:delays=[^,]+, )?(?:dsn=[^,]+, )?status=(\S+)(.*)$/o) >= 4)
        {
 
            if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) {
Comment 1 Andrej Kacian (RETIRED) gentoo-dev 2006-08-17 12:58:51 UTC
Does it break parsing of 2.2 and previous logs?
Comment 2 crywolf 2006-08-17 13:44:38 UTC
It doesn't seem to.  It looks like it simply adds support for additional keywords in each log line.  I have used it successfully on a machine with postfix 2.2.10
Comment 3 Andrej Kacian (RETIRED) gentoo-dev 2006-11-16 15:41:46 UTC
OK, pflogsumm maintainer confirmed that he's planning to get around to updating pflogsumm in this regard eventually, but still hasn't done so.

1.1.0-r1 has the patch applied. Thanks!