postfix/postfix.patch.pfls

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
child 495
01294b31a79e
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

michael@146 1 This patch makes Pflogsumm working with the particular format
michael@146 2 of the OSSP fsl based Postfix logfile and additionally allows
michael@146 3 one to specify a more flexible data format.
michael@146 4
michael@146 5 Index: pflogsumm.1
michael@146 6 --- pflogsumm.1.orig 2007-04-06 16:11:28 +0200
michael@146 7 +++ pflogsumm.1 2007-04-06 17:35:12 +0200
michael@146 8 @@ -172,6 +172,8 @@
michael@146 9 .Vb 2
michael@146 10 \& -d today generate report for just today
michael@146 11 \& -d yesterday generate report for just "yesterday"
michael@146 12 +\& -d YYYY-MM-DD generate report for just "YYYY-MM-DD"
michael@146 13 +\& (Really takes string Date::Parse will handle)
michael@146 14 .Ve
michael@146 15 .PP
michael@146 16 .Vb 1
michael@146 17 Index: pflogsumm.pl
michael@146 18 --- pflogsumm.pl.orig 2008-06-29 15:46:01 +0200
michael@146 19 +++ pflogsumm.pl 2008-06-29 19:39:07 +0200
michael@146 20 @@ -10,7 +10,7 @@
michael@146 21
michael@146 22 =head1 SYNOPSIS
michael@146 23
michael@146 24 - pflogsumm.pl -[eq] [-d <today|yesterday>] [-h <cnt>] [-u <cnt>]
michael@146 25 + pflogsumm.pl -[eq] [-d <today|yesterday|YYYY-MM-DD>] [-h <cnt>] [-u <cnt>]
michael@146 26 [--verp_mung[=<n>]] [--verbose_msg_detail] [--iso_date_time]
michael@146 27 [-m|--uucp_mung] [-i|--ignore_case] [--smtpd_stats] [--mailq]
michael@146 28 [--problems_first] [--rej_add_from] [--no_bounce_detail]
michael@146 29 @@ -37,6 +37,9 @@
michael@146 30
michael@146 31 -d today generate report for just today
michael@146 32 -d yesterday generate report for just "yesterday"
michael@146 33 + -d YYYY-MM-DD generate report for just "YYYY-MM-DD"
michael@146 34 + (Actually this will take any date string
michael@146 35 + parsable by the perl Date::Parse module)
michael@146 36
michael@146 37 -e extended (extreme? excessive?) detail
michael@146 38
michael@146 39 @@ -359,6 +362,7 @@
michael@146 40 use strict;
michael@146 41 use locale;
michael@146 42 use Getopt::Long;
michael@146 43 +use Date::Parse;
michael@146 44 eval { require Date::Calc };
michael@146 45 my $hasDateCalc = $@ ? 0 : 1;
michael@146 46
michael@146 47 @@ -542,8 +546,8 @@
michael@146 48 my $logRmdr;
michael@146 49 next unless((($msgMonStr, $msgDay, $msgHr, $msgMin, $msgSec, $logRmdr) =
michael@146 50 /^(...) +(\d+) (..):(..):(..) \S+ (.+)$/o) == 6);
michael@146 51 - unless((($cmd, $qid) = $logRmdr =~ m#^(?:postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
michael@146 52 - (($cmd, $qid) = $logRmdr =~ m#^((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
michael@146 53 + unless((($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+(?:postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
michael@146 54 + (($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
michael@146 55 {
michael@146 56 #print UNPROCD "$_";
michael@146 57 next;
michael@146 58 @@ -1406,11 +1410,11 @@
michael@146 59 # Back up to yesterday
michael@146 60 $time -= ((localtime($time))[2] + 2) * 3600;
michael@146 61 } elsif($dateOpt ne "today") {
michael@146 62 - die "$usageMsg\n";
michael@146 63 + $time = str2time($dateOpt);
michael@146 64 }
michael@146 65 my ($t_mday, $t_mon) = (localtime($time))[3,4];
michael@146 66
michael@146 67 - return sprintf("%s %2d", $monthNames[$t_mon], $t_mday);
michael@146 68 + return sprintf("%s %02d", $monthNames[$t_mon], $t_mday);
michael@146 69 }
michael@146 70
michael@146 71 # if there's a real domain: uses that. Otherwise uses the IP addr.

mercurial