$OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $
--- pflogsumm.pl.orig	2004-01-28 13:38:53.000000000 +1000
+++ pflogsumm.pl	2004-01-28 13:39:29.000000000 +1000
@@ -4,13 +4,13 @@ eval 'exec perl -S $0 "$@"'
 
 =head1 NAME
 
-pflogsumm.pl - Produce Postfix MTA logfile summary
+pflogsumm - Produce Postfix MTA logfile summary
 
 Copyright (C) 1998-2003 by James S. Seymour, Release 1.1.0.
 
 =head1 SYNOPSIS
 
-    pflogsumm.pl -[eq] [-d <today|yesterday>] [-h <cnt>] [-u <cnt>]
+    pflogsumm -[eq] [-d <today|yesterday>] [-h <cnt>] [-u <cnt>]
 	[--verp_mung[=<n>]] [--verbose_msg_detail] [--iso_date_time]
 	[-m|--uucp_mung] [-i|--ignore_case] [--smtpd_stats] [--mailq]
 	[--problems_first] [--rej_add_from] [--no_bounce_detail]
@@ -18,7 +18,7 @@ Copyright (C) 1998-2003 by James S. Seym
 	[--no_smtpd_warnings] [--zero_fill] [--syslog_name=string]
 	[file1 [filen]]
 
-    pflogsumm.pl -[help|version]
+    pflogsumm -[help|version]
 
     If no file(s) specified, reads from stdin.  Output is to stdout.
 
@@ -119,7 +119,7 @@ Copyright (C) 1998-2003 by James S. Seym
 		    The message may be delivered long-enough after the
 		    (last) qmgr log entry that the information is not in
 		    the log(s) processed by a particular run of
-		    pflogsumm.pl.  This throws off "Recipients by message
+		    pflogsumm.  This throws off "Recipients by message
 		    size" and the total for "bytes delivered." These are
 		    normally reported by pflogsumm as "Messages with no
 		    size data."
@@ -216,15 +216,15 @@ Copyright (C) 1998-2003 by James S. Seym
 
     Produce a report of previous day's activities:
 
-        pflogsumm.pl -d yesterday /var/log/maillog
+        pflogsumm -d yesterday /var/log/maillog
 
     A report of prior week's activities (after logs rotated):
 
-        pflogsumm.pl /var/log/maillog.0
+        pflogsumm /var/log/maillog.0
 
     What's happened so far today:
 
-        pflogsumm.pl -d today /var/log/maillog
+        pflogsumm -d today /var/log/maillog
 
     Crontab entry to generate a report of the previous day's activity
     at 10 minutes after midnight.
@@ -447,7 +447,7 @@ for (0 .. 23) {
     $smtpdPerHr[$_]  = [0,0,0];
 }
 
-$progName = "pflogsumm.pl";
+$progName = "pflogsumm";
 $usageMsg =
     "usage: $progName -[eq] [-d <today|yesterday>] [-h <cnt>] [-u <cnt>]
        [--verp_mung[=<n>]] [--verbose_msg_detail] [--iso_date_time]
@@ -696,7 +696,7 @@ while(<>) {
 	    }
 	}
 	elsif((($addr, $relay, $delay, $status, $toRmdr) = $logRmdr =~
-		/to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), status=(\S+)(.*)$/o) >= 4)
+		/to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), (?:dsn=\d+\.\d+\.\d+, )?status=(\S+)(.*)$/o) >= 4)
 	{
 
 	    if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) {
