rpms/logwatch/F-8 logwatch-7.3.6-dovecot_back.patch, NONE, 1.1 logwatch.spec, 1.86, 1.87

Ivana Varekova (varekova) fedora-extras-commits at redhat.com
Wed Mar 5 10:39:49 UTC 2008


Author: varekova

Update of /cvs/pkgs/rpms/logwatch/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30030

Modified Files:
	logwatch.spec 
Added Files:
	logwatch-7.3.6-dovecot_back.patch 
Log Message:
- resolves 436058
  dovecot script for logwatch needs fix for IPv6



logwatch-7.3.6-dovecot_back.patch:

--- NEW FILE logwatch-7.3.6-dovecot_back.patch ---
diff -up logwatch-7.3.6/scripts/services/dovecot.pom logwatch-7.3.6/scripts/services/dovecot
--- logwatch-7.3.6/scripts/services/dovecot.pom	2008-02-20 16:29:17.000000000 +0100
+++ logwatch-7.3.6/scripts/services/dovecot	2008-03-05 11:12:56.000000000 +0100
@@ -1,7 +1,16 @@
 ########################################################
-# $Id: dovecot,v 1.6 2007/03/17 19:13:13 bjorn Exp $
+# $Id: dovecot,v 1.9 2008/02/14 18:19:51 mike Exp $
 ########################################################
 # $Log: dovecot,v $
+# Revision 1.9  2008/02/14 18:19:51  mike
+# Patch from Gilles Detillieux summarize pop3/imap -mgt
+#
+# Revision 1.8  2008/01/16 20:11:04  bjorn
+# Filtering dovecot start-up message, by Gilles Detillieux.
+#
+# Revision 1.7  2007/06/18 03:54:45  bjorn
+# Better printing of IPv6 addresses, by Patrick Vande Walle.
+#
 # Revision 1.6  2007/03/17 19:13:13  bjorn
 # Now handling dovecot starts/kills.
 #
@@ -62,12 +71,14 @@ while (defined($ThisLine = <STDIN>)) {
      } elsif ( ($User, $Host) = ( $ThisLine =~ /^pop3-login: Login: (.*?) \[(.*)\]/ ) ) {
       if ($Host !~ /$IgnoreHost/) {
          $Login{$User}{$Host}++;
+         $LoginPOP3{$User}++;
          $ConnectionPOP3{$Host}++;
          $Connection{$Host}++; 
       }
    } elsif ( ($User, $Host) = ( $ThisLine =~ /^imap-login: Login: (.*?) \[(.*)\]/ ) ) {
       if ($Host !~ /$IgnoreHost/) {
          $Login{$User}{$Host}++;
+         $LoginIMAP{$User}++;
          $ConnectionIMAP{$Host}++;
          $Connection{$Host}++; 
       }
@@ -76,12 +87,14 @@ while (defined($ThisLine = <STDIN>)) {
     } elsif ( ($User, $Host) = ( $ThisLine =~ /^dovecot: pop3-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/ ) ) {
       if ($Host !~ /$IgnoreHost/) {
          $Login{$User}{$Host}++;
+         $LoginPOP3{$User}++;
          $ConnectionPOP3{$Host}++;
          $Connection{$Host}++;
       }
    } elsif ( ($User, $Host) = ( $ThisLine =~ /^dovecot: imap-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/) ) {
       if ($Host !~ /$IgnoreHost/) {
          $Login{$User}{$Host}++;
+         $LoginIMAP{$User}++;
          $ConnectionIMAP{$Host}++;
          $Connection{$Host}++;
        }
@@ -132,8 +145,8 @@ if ( ( $Detail >=5 ) and $Restarts ) {
 if ( ( $Detail >= 5 ) and (keys %Connection)) {
    print     "\n[Dovecot IMAP and POP3] Connections:".
              "\n====================================".
-             "\n                      Host |     POP3    |   IMAP   |   Total ".
-             "\n-------------------------- | ----------- |--------- | ---------";
+             "\n                                  Host |    POP3   |   IMAP   |   Total ".
+             "\n-------------------------------------- | --------- |--------- | ---------";
   
    $TLSInitFail = 0;
    foreach $Host (sort keys %Connection) {
@@ -151,9 +164,9 @@ if ( ( $Detail >= 5 ) and (keys %Connect
 # Cleanly display IPv4 addresses
       $Host=~ s/::ffff://;
       $HostLength = length($Host);
-      $HostSpaceLength = 26 - $HostLength;
+      $HostSpaceLength = 38 - $HostLength;
       $CountLength = length("$Conns");
-      $CountSpaceLength = 12 - $CountLength;
+      $CountSpaceLength = 10 - $CountLength;
       $IMAPLength = length("$IMAP");
       $IMAPSpaceLength = 9 - $IMAPLength;
       $TotalLenght = length("$Total");
@@ -165,12 +178,12 @@ if ( ( $Detail >= 5 ) and (keys %Connect
       $TotalCount += $Total;
    }
    $POP3Length = length("$POP3Count");
-   $POP3SpaceLength = 40 - $POP3Length;
+   $POP3SpaceLength = 50 - $POP3Length;
    $IMAPLength = length("$IMAPCount");
    $IMAPSpaceLength = 9 - $IMAPLength;
    $TotalLength = length("$TotalCount");
    $totalSpaceLength = 10 - $TotalLength;
-   print "\n" . "-" x 63;
+   print "\n" . "-" x 73;
    print "\n" . " " x $POP3SpaceLength . $POP3Count . " |" . " " x $IMAPSpaceLength . $IMAPCount .
                  " |" . " " x $totalSpaceLength . $TotalCount . "\n";
 }
@@ -180,6 +193,13 @@ if ( ( $Detail >= 10 ) and (keys %Login)
    $LoginCount = 0;
    foreach my $User (keys %Login) {
       print "\n\n  User $User:";
+      if ($LoginPOP3{$User} > 0 || $LoginIMAP{$User} > 0) {
+         print "   (";
+         if ($LoginPOP3{$User} > 0) { print "$LoginPOP3{$User} POP3"; };
+         if ($LoginPOP3{$User} > 0 && $LoginIMAP{$User} > 0) { print "/"; };
+         if ($LoginIMAP{$User} > 0) { print "$LoginIMAP{$User} IMAP"; };
+         print ")";
+      }
       $UserCount = 0;
       $NumHosts = 0;
       foreach $Host (keys %{$Login{$User}}) {


Index: logwatch.spec
===================================================================
RCS file: /cvs/pkgs/rpms/logwatch/F-8/logwatch.spec,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- logwatch.spec	20 Feb 2008 15:47:37 -0000	1.86
+++ logwatch.spec	5 Mar 2008 10:39:09 -0000	1.87
@@ -1,7 +1,7 @@
 Summary: A log file analysis program
 Name: logwatch
 Version: 7.3.6
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: MIT
 Group: Applications/System
 URL: http://www.logwatch.org/
@@ -34,6 +34,7 @@
 Patch28: logwatch-7.3.6-usage.patch
 Patch29: logwatch-7.3.6-maillog.patch
 Patch30: logwatch-7.3.6-cron4.patch
+Patch31: logwatch-7.3.6-dovecot_back.patch
 
 Requires: textutils sh-utils grep mailx
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -75,6 +76,7 @@
 %patch28 -p1
 %patch29 -p1
 %patch30 -p1
+%patch31 -p1
 rm -f scripts/services/*.orig
 
 %build
@@ -188,6 +190,11 @@
 %doc License project/CHANGES 
 
 %changelog
+* Wed Mar  5 2008 Ivana Varekova <varekova at redhat.com> 7.3.6-16
+- Resolves: #436058
+  dovecot script for logwatch needs fix for IPv6
+  NOT BUILD YET
+
 * Wed Feb 20 2008 Ivana Varekova <varekova at redhat.com> 7.3.6-15
 - Resolves: #427596
   fix mailto setting 




More information about the fedora-extras-commits mailing list