postfix/postfix.patch.pfls

Tue, 28 Aug 2012 18:28:45 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:28:45 +0200
changeset 528
3b08e6396b45
parent 146
bc79b3740eb8
permissions
-rw-r--r--

Massively update from 5.1 to 5.5 release, completely changing from
autotools to cmake build configuration along with the corresponding
corrections. Correct some less important problems like typical german
english mistakes, as well as use parallel make for faster builds with
SMP and multicore architectures. Warning, the 5.5 releases of MySQL
seem to be equally bug ridden as the 5.1 are, for example building
the NDBCluster storage engine fails.

     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