logwatch/logwatch-7.3.6-dovecot2.patch

37 lines
1.7 KiB
Diff

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 2009-10-12 12:48:21.000000000 +0200
+++ logwatch-7.3.6/scripts/services/dovecot 2009-10-12 13:19:04.000000000 +0200
@@ -103,6 +103,8 @@ while (defined($ThisLine = <STDIN>)) {
$Disconnected{"no reason"}++;
} elsif (($Reason) = ($ThisLine =~ /Disconnected: (.*) \[/) ) {
$Disconnected{$Reason}++;
+ } elsif (($Reason) = ($ThisLine =~ /Disconnected \((.*)\):/) ) {
+ $Disconnected{$Reason}++;
} elsif (($Reason, $Host) = ($ThisLine =~ /TLS initialization failed/) ) {
$TLSInitFail++;
} elsif (($Host) = ($ThisLine =~ /Aborted login \[(.*)\]/)) {
@@ -135,6 +137,9 @@ while (defined($ThisLine = <STDIN>)) {
} elsif (($Error) = ($ThisLine =~ /child \d* \(login\) returned error (.*)/)) {
# dovecot: child 23747 (login) returned error 89
$ChildErr{$Error}++;
+ } elsif (($Name) = ($ThisLine =~ /dovecot: IMAP\((.*)\): .*(.*) failed: Disk quota exceeded/)) {
+ # dovecot: IMAP(podracka): mkdir(/home/LF/KLINIKY/podracka/mail/.imap/saved-messages) failed: Disk quota exceeded
+ $DiskQuotaExceed{$Name}++;
} else {
# Report any unmatched entries...
chomp($ThisLine);
@@ -261,6 +266,13 @@ if ($TLSInitFail > 0) {
print "\n\nTLS Initialization failed $TLSInitFail Time(s)";
}
+if (keys %DiskQuotaExceed) {
+ print "\n\nDisk quota exceeded:";
+ foreach my $Name (sort keys %DiskQuotaExceed) {
+ print "\n disk quota for user '". $Name . "' exceeded: ". $DiskQuotaExceed{$Name} ." Time(s)";
+ }
+}
+
if (keys %OtherList) {
print "\n\n**Unmatched Entries**\n";
foreach $line (sort {$a cmp $b} keys %OtherList) {