postfix/postfix.patch.pfls

Fri, 07 Sep 2012 19:08:07 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 07 Sep 2012 19:08:07 +0200
changeset 667
9dacbd1d1aa2
parent 146
bc79b3740eb8
permissions
-rw-r--r--

Correct build configuration in Solaris subdir, correct english grammar,
remove irrelevant strip notice, introduce custom CFLAG logic, facilitate
use of Solaris Studio compiler with needed build configuration
adjustments, conditionally build 64 bit position independent code,
and accommodate tun(7) in newer Solaris releases by renaming driver
and module from conflicting 'tun' to 'vtun'. These changes include
some nonstandard 'I give up' logic causing out of tree builds by
manipulating the PATH, for example.

     1 Index: pflogsumm.1
     2 --- pflogsumm.1.orig	2012-02-05 23:34:29.000000000 +0100
     3 +++ pflogsumm.1	2012-02-06 08:49:47.000000000 +0100
     4 @@ -171,6 +171,8 @@
     5  \&
     6  \&    \-d today       generate report for just today
     7  \&    \-d yesterday   generate report for just "yesterday"
     8 +\&    \-d YYYY-MM-DD  generate report for just "YYYY-MM-DD"
     9 +\&                    (Really takes string Date::Parse will handle)
    10  \&
    11  \&    \-\-deferral\-detail <cnt>
    12  \&
    13 Index: pflogsumm.pl
    14 --- pflogsumm.pl.orig	2012-02-05 23:25:25.000000000 +0100
    15 +++ pflogsumm.pl	2012-02-06 20:53:39.000000000 +0100
    16 @@ -10,7 +10,7 @@
    18  =head1 SYNOPSIS
    20 -    pflogsumm.pl -[eq] [-d <today|yesterday>] [--detail <cnt>]
    21 +    pflogsumm.pl -[eq] [-d <today|yesterday|YYYY-MM-DD>] [--detail <cnt>]
    22  	[--bounce-detail <cnt>] [--deferral-detail <cnt>]
    23  	[-h <cnt>] [-i|--ignore-case] [--iso-date-time] [--mailq]
    24  	[-m|--uucp-mung] [--no-no-msg-size] [--problems-first]
    25 @@ -43,6 +43,9 @@
    27      -d today       generate report for just today
    28      -d yesterday   generate report for just "yesterday"
    29 +    -d YYYY-MM-DD  generate report for just "YYYY-MM-DD"
    30 +                   (Actually this will take any date string
    31 +                   parsable by the perl Date::Parse module)
    33      --deferral-detail <cnt>
    35 @@ -398,6 +401,7 @@
    36  use strict;
    37  use locale;
    38  use Getopt::Long;
    39 +use Date::Parse;
    40  eval { require Date::Calc };
    41  my $hasDateCalc = $@ ? 0 : 1;
    43 @@ -639,8 +643,8 @@
    44  	--$msgMon;
    45      }
    47 -    unless((($cmd, $qid) = $logRmdr =~ m#^(?:postfix|$syslogName)(?:/(?:smtps|submission))?/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
    48 -           (($cmd, $qid) = $logRmdr =~ m#^((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
    49 +    unless((($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+(?:postfix|$syslogName)(?:/(?:smtps|submission))?/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
    50 +           (($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
    51      {
    52  	#print UNPROCD "$_";
    53  	next;
    54 @@ -1514,11 +1518,11 @@
    55  	# Back up to yesterday
    56  	$time -= ((localtime($time))[2] + 2) * 3600;
    57      } elsif($dateOpt ne "today") {
    58 -	die "$usageMsg\n";
    59 +	$time = str2time($dateOpt);
    60      }
    61      my ($t_mday, $t_mon, $t_year) = (localtime($time))[3,4,5];
    63 -    return sprintf("%s %2d", $monthNames[$t_mon], $t_mday), sprintf("%04d-%02d-%02d", $t_year+1900, $t_mon+1, $t_mday);
    64 +    return sprintf("%s %02d", $monthNames[$t_mon], $t_mday), sprintf("%04d-%02d-%02d", $t_year+1900, $t_mon+1, $t_mday);
    65  }
    67  # if there's a real domain: uses that.  Otherwise uses the IP addr.

mercurial