SF.net SVN: logwatch:[197] scripts/services

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 197
          http://sourceforge.net/p/logwatch/code/197
Author:   opoplawski
Date:     2014-05-30 17:31:32 +0000 (Fri, 30 May 2014)
Log Message:
-----------
Revert accidental dovecot and zz-disk_space changes

Modified Paths:
--------------
    scripts/services/dovecot
    scripts/services/zz-disk_space

Modified: scripts/services/dovecot
===================================================================
--- scripts/services/dovecot	2014-05-30 17:17:15 UTC (rev 196)
+++ scripts/services/dovecot	2014-05-30 17:31:32 UTC (rev 197)
@@ -181,43 +181,43 @@
       }
 
 # 'lda' for dovecot 2.0, 'deliver' for earlier versions
-    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\):(?: Info:)? msgid=.*: saved mail to (\S+)/ ) ) {
+    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): msgid=.*: saved mail to (\S+)/ ) ) {
       $Deliver{$User}{$Mailbox}++;
 
 # For Sieve-based delivery
-    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^(?:$dovecottag )?(?:lda\(|deliver\(|lmtp\(\d+, )(.*)\): (?:[^:]+: )?sieve: msgid=.*: stored mail into mailbox '([^']*)'/ ) ) {
+    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda\(|deliver\(|lmtp\(\d+, )(.*)\): (?:[^:]+: )?sieve: msgid=.*: stored mail into mailbox '([^']*)'/ ) ) {
       $Deliver{$User}{$Mailbox}++;
 
 # LMTP-based delivery
-    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^(?:$dovecottag )?lmtp\(\d+, (.*)\): [^:]+: msgid=.*: saved mail to (\S+)/ ) ) {
+    } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag lmtp\(\d+, (.*)\): [^:]+: msgid=.*: saved mail to (\S+)/ ) ) {
     # dovecot: [ID 583609 mail.info] lmtp(12782, [email protected]): jBt1EfjCMk3uMQAAm9eMBA: msgid=<[email protected]>: saved mail to INBOX
       $Deliver{$User}{$Mailbox}++;
 
 # sieve forward
-    } elsif (($User, $Recip) = ($ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\): sieve: msgid=.* forwarded to \<(.*)\>/)) {
+    } elsif (($User, $Recip) = ($ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.* forwarded to \<(.*)\>/)) {
       $Forwarded{$User}{$Recip}++;
 
 # sieve vacation
-    } elsif (($User, $Recip) = ($ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\): sieve: msgid=.* sent vacation response to \<(.*)\>/)) {
+    } elsif (($User, $Recip) = ($ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.* sent vacation response to \<(.*)\>/)) {
       $VacationResponse{$User}{$Recip}++;
 
-    } elsif (($User, $Recip) = ($ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\): sieve: msgid=.* discarded duplicate vacation response to \<(.*)\>/ )) {
+    } elsif (($User, $Recip) = ($ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.* discarded duplicate vacation response to \<(.*)\>/ )) {
       $VacationDup{$User}{$Recip}++;
 
-    } elsif ( $ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\(.*\): sieve: msgid=.* marked message to be discarded if not explicitly delivered/ ) {
+    } elsif ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\(.*\): sieve: msgid=.* marked message to be discarded if not explicitly delivered/ ) {
     # dovecot: lda(joe): sieve: msgid=<m$01$@com>: marked message to be discarded if not explicitly delivered (discard action)
     # IGNORE
-    } elsif ( $ThisLine =~ /^(?:$dovecottag )?lmtp\(.*\): Connect from/ ) {
+    } elsif ( $ThisLine =~ /^$dovecottag lmtp\(.*\): Connect from/ ) {
     # dovecot: [ID 583609 mail.info] lmtp(12782): Connect from local: 1 Time(s)
     # IGNORE
 
-    } elsif ( $ThisLine =~ /^(?:$dovecottag )?lmtp\(.*\): Disconnect from/ ) {
+    } elsif ( $ThisLine =~ /^$dovecottag lmtp\(.*\): Disconnect from/ ) {
     # dovecot: [ID 583609 mail.info] lmtp(12782): Disconnect from local: Client quit: 1 Time(s)
     # IGNORE
 
 
 # This is for Dovecot 1.0 series
-    } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?pop3-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/ ) ) {
+    } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag pop3-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/ ) ) {
       if ($Host !~ /$IgnoreHost/) {
          $Host = hostName($Host);
          $Login{$User}{$Host}++;
@@ -225,7 +225,7 @@
          $ConnectionPOP3{$Host}++;
          $Connection{$Host}++;
       }
-   } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/) ) {
+   } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag imap-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/) ) {
       if ($Host !~ /$IgnoreHost/) {
          $Host = hostName($Host);
          $Login{$User}{$Host}++;
@@ -235,14 +235,14 @@
        }
 
    # Dovecot 2.0 proxy
-   } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?pop3-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
+   } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag pop3-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
       if ($Host !~ /$IgnoreHost/) {
          $ProxyLogin{$User}{$Host}++;
          $ProxyLoginPOP3{$User}++;
          $ProxyConnectionPOP3{$Host}++;
          $ProxyConnection{$Host}++;
       }
-   } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
+   } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag imap-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
       if ($Host !~ /$IgnoreHost/) {
          $ProxyLogin{$User}{$Host}++;
          $ProxyLoginIMAP{$User}++;
@@ -306,7 +306,7 @@
    # dovecot: child 23747 (login) returned error 89
    # dovecot: log: Error: service(auth): child 19654 returned error 89 (Fatal failure)
       $ChildErr{$Error}++;
-   } elsif (($Name) = ($ThisLine =~ /(?:$dovecottag )?IMAP\((.*)\): .*(.*) failed: Disk quota exceeded/i)) {
+   } elsif (($Name) = ($ThisLine =~ /$dovecottag IMAP\((.*)\): .*(.*) failed: Disk quota exceeded/i)) {
    # dovecot: IMAP(podracka): mkdir(/home/LF/KLINIKY/podracka/mail/.imap/saved-messages) failed: Disk quota exceeded
       $DiskQuotaExceed{$Name}++;
    } else {

Modified: scripts/services/zz-disk_space
===================================================================
--- scripts/services/zz-disk_space	2014-05-30 17:17:15 UTC (rev 196)
+++ scripts/services/zz-disk_space	2014-05-30 17:31:32 UTC (rev 197)
@@ -171,23 +171,6 @@
 	print "\n";
 }
 
-sub LVSpace ()
-{
-	if ( $ENV{'lvs_options'} ) {
-		$lvs_options = $ENV{'lvs_options'};
-	};
-
-	$lvs_cmd = "lvs $lvs_options";
-
-	if ( $ENV{'lvs_cmd'} ) {
-		$lvs_cmd = $ENV{'lvs_cmd'};
-	};
-
-	system($lvs_cmd);
-
-	print "\n";
-}
-
 sub DiskFull {
 	my $o = `$disk_cmd`;
 	my @rows = split('\n', $o);
@@ -206,10 +189,7 @@
 #Main
 
 #Only show disk space "df" by default -mgt
-if (($ENV{PRINTING} eq 'y') or $Detail) {
-	DiskSpace();
-	LVSpace();
-}
+DiskSpace() if (($ENV{PRINTING} eq 'y') or $Detail);
 
 if ( $show_disk_usage == 1 ) { DiskUsage(); }; #Turn on in zz-disk_space.conf
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.