postfix/postfix.patch.pfls

Thu, 04 Oct 2012 20:30:05 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 04 Oct 2012 20:30:05 +0200
changeset 715
c10fb90893b9
parent 146
bc79b3740eb8
permissions
-rw-r--r--

Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.

     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