Relatively recent versions of postfix can be configured to use non-repeating queue IDs. This simplifies log correlation, and can be enabled with the main.cf parameter enable_long_queue_ids. However, the new queue IDs can include lower-case letters, and this breaks mailgraph parsing of the logs. The patch below seems to fix the bit rot.
Regards, Liviu Daia
Index: Makefile =================================================================== RCS file: /cvs/ports/mail/mailgraph/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- Makefile 19 Nov 2010 07:23:07 -0000 1.9 +++ Makefile 20 Dec 2012 12:50:59 -0000 @@ -3,6 +3,7 @@ COMMENT= RRDtool frontend for Postfix statistics DISTNAME= mailgraph-1.14 +REVISION= 0 CATEGORIES= net mail MASTER_SITES= ${HOMEPAGE}/pub/ \ Index: patches/patch-mailgraph_pl =================================================================== RCS file: patches/patch-mailgraph_pl diff -N patches/patch-mailgraph_pl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-mailgraph_pl 20 Dec 2012 12:50:59 -0000 @@ -0,0 +1,42 @@ +$OpenBSD$ +--- mailgraph.pl.orig Wed Aug 29 12:06:01 2007 ++++ mailgraph.pl Thu Dec 20 14:41:13 2012 +@@ -596,7 +596,7 @@ sub process_line($) + } + } + elsif($prog eq 'smtpd') { +- if($text =~ /^[0-9A-Z]+: client=(\S+)/) { ++ if($text =~ /^[0-9a-zA-Z]+: client=(\S+)/) { + my $client = $1; + return if $opt{'ignore-localhost'} and + $client =~ /\[127\.0\.0\.1\]$/; +@@ -604,16 +604,16 @@ sub process_line($) + $client =~ /$opt{'ignore-host'}/oi; + event($time, 'received'); + } +- elsif($opt{'virbl-is-virus'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using virbl.dnsbl.bit.nl/) { ++ elsif($opt{'virbl-is-virus'} and $text =~ /^(?:[0-9a-zA-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using virbl.dnsbl.bit.nl/) { + event($time, 'virus'); + } +- elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) { ++ elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9a-zA-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) { + event($time, 'spam'); + } +- elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) { ++ elsif($text =~ /^(?:[0-9a-zA-Z]+: |NOQUEUE: )?reject: /) { + event($time, 'rejected'); + } +- elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?milter-reject: /) { ++ elsif($text =~ /^(?:[0-9a-zA-Z]+: |NOQUEUE: )?milter-reject: /) { + if($text =~ /Blocked by SpamAssassin/) { + event($time, 'spam'); + } +@@ -628,7 +628,7 @@ sub process_line($) + } + } + elsif($prog eq 'cleanup') { +- if($text =~ /^[0-9A-Z]+: (?:reject|discard): /) { ++ if($text =~ /^[0-9a-zA-Z]+: (?:reject|discard): /) { + event($time, 'rejected'); + } + }