Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 287891 Details for
Bug 424031
logwatch ignores dovecot 1.0 log entries
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to backport logwatch's dovecot script and conf files from FC9 dev. to RHEL 5
logwatch-7.3-dovecot1.0.patch (text/plain), 6.96 KB, created by
Gilles Detillieux
on 2007-12-13 20:09:00 UTC
(
hide
)
Description:
patch to backport logwatch's dovecot script and conf files from FC9 dev. to RHEL 5
Filename:
MIME Type:
Creator:
Gilles Detillieux
Created:
2007-12-13 20:09:00 UTC
Size:
6.96 KB
patch
obsolete
>--- logwatch/scripts/services/dovecot.orig 2007-03-25 02:24:52.000000000 -0500 >+++ logwatch/scripts/services/dovecot 2007-11-22 05:16:21.000000000 -0600 >@@ -1,7 +1,22 @@ > ######################################################## >-# $Id: dovecot,v 1.2 2005/12/07 04:31:44 bjorn Exp $ >+# $Id: dovecot,v 1.6 2007/03/17 19:13:13 bjorn Exp $ > ######################################################## > # $Log: dovecot,v $ >+# Revision 1.6 2007/03/17 19:13:13 bjorn >+# Now handling dovecot starts/kills. >+# >+# Revision 1.5 2006/12/20 15:25:09 bjorn >+# Additional filtering, by Ivana Varekova. >+# >+# Revision 1.4 2006/08/13 22:02:31 bjorn >+# IPv4 addresses displayed in native format, and don't display user totals >+# if user connects from only one IP address; changes by Patrick Vande Walle. >+# >+# Revision 1.3 2006/08/13 21:06:33 bjorn >+# Added support for Dovecot 1.0 based on patches from Mark Nienberg, and >+# IP addresses displayed without brackets for consistency across versions; >+# modifications by Patrick Vande Walle. >+# > # Revision 1.2 2005/12/07 04:31:44 bjorn > # Added $dovecot_ignore_host. > # >@@ -26,6 +41,9 @@ my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0; > my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0; > my $IgnoreHost = $ENV{'dovecot_ignore_host'} || ""; > >+my $Restarts = 0; >+my $End = 0; >+ > if ( $Debug >= 5 ) { > print STDERR "\n\nDEBUG \n\n"; > } >@@ -34,27 +52,66 @@ while (defined($ThisLine = <STDIN>)) { > # remove timestamp. We can't use *RemoveHeaders because we need the > # service name > $ThisLine =~ s/^\w{3} .\d \d\d:\d\d:\d\d [^ ]* //; >- if ( ($User, $Host) = ( $ThisLine =~ /^pop3-login: Login: (.*?) (\[.*\])/ ) ) { >+ if ($ThisLine =~ /ssl-build-param: SSL parameters regeneration completed/) { >+ # We don't care about these >+ } elsif ( $ThisLine =~ /Killed with signal /) { >+ $End++; >+ } elsif ( $ThisLine =~ /Dovecot starting up$/) { >+ $Restarts++; >+ $End = 0; >+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^pop3-login: Login: (.*?) \[(.*)\]/ ) ) { > if ($Host !~ /$IgnoreHost/) { > $Login{$User}{$Host}++; > $ConnectionPOP3{$Host}++; > $Connection{$Host}++; > } >- } elsif ( ($User, $Host) = ( $ThisLine =~ /^imap-login: Login: (.*?) (\[.*\])/ ) ) { >+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^imap-login: Login: (.*?) \[(.*)\]/ ) ) { > if ($Host !~ /$IgnoreHost/) { > $Login{$User}{$Host}++; > $ConnectionIMAP{$Host}++; > $Connection{$Host}++; > } >- } elsif ($ThisLine =~ /Disconnected /) { >- # ignore >- } elsif (($Reason, $Host) = ($ThisLine =~ /Disconnected: (.*) (\[.*\])/) ) { >- # $Host not used - is it helpful? >+ >+# This is for Dovecot 1.0 series >+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^dovecot: pop3-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/ ) ) { >+ if ($Host !~ /$IgnoreHost/) { >+ $Login{$User}{$Host}++; >+ $ConnectionPOP3{$Host}++; >+ $Connection{$Host}++; >+ } >+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^dovecot: imap-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/) ) { >+ if ($Host !~ /$IgnoreHost/) { >+ $Login{$User}{$Host}++; >+ $ConnectionIMAP{$Host}++; >+ $Connection{$Host}++; >+ } >+ >+ } elsif ($ThisLine =~ /Disconnected \[/) { >+ $Disconnected{"no reason"}++; >+ } elsif (($Reason) = ($ThisLine =~ /Disconnected: (.*) \[/) ) { > $Disconnected{$Reason}++; > } elsif (($Reason, $Host) = ($ThisLine =~ /TLS initialization failed/) ) { > $TLSInitFail++; >- } elsif (($Host) = ($ThisLine =~ /Aborted login (\[.*\])/) ) { >+ } elsif (($Host) = ($ThisLine =~ /Aborted login \[(.*)\]/) ) { > $Aborted{$Host}++; >+ >+# This is for Dovecot 1.0 series >+ >+ } elsif ($ThisLine =~ /Disconnected for inactivity/) { >+ $Disconnected{"Inactivity"}++; >+ } elsif ($ThisLine =~ /Disconnected in IDLE/) { >+ $Disconnected{"in IDLE"}++; >+ } elsif ($ThisLine =~ /Disconnected$/) { >+ $Disconnected{"no reason"}++; >+ } elsif (($Reason) = ($ThisLine =~ /pop3-login: Disconnected: (.+)/) ) { >+ $Disconnected{"no reason"}++; >+ } elsif (($Reason) = ($ThisLine =~ /imap-login: Disconnected: (.+)/) ) { >+ $Disconnected{"no reason"}++; >+ } elsif (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+)/) ) { >+ $Disconnected{$Reason}++; >+ } elsif (($Reason) = ($ThisLine =~ /POP3.+: Disconnected: (.+) top/) ) { >+ $Disconnected{$Reason}++; >+ > } else { > # Report any unmatched entries... > chomp($ThisLine); >@@ -64,6 +121,14 @@ while (defined($ThisLine = <STDIN>)) { > > ################################################ > >+if ( $End ) { >+ print "\nDovecot was killed, and not restarted afterwards.\n"; >+} >+ >+if ( ( $Detail >=5 ) and $Restarts ) { >+ print "\nDovecot restarted $Restarts time(s)."; >+} >+ > if ( ( $Detail >= 5 ) and (keys %Connection)) { > print "\n[Dovecot IMAP and POP3] Connections:". > "\n====================================". >@@ -83,6 +148,8 @@ if ( ( $Detail >= 5 ) and (keys %Connect > } else { > $IMAP = 0; > } >+# Cleanly display IPv4 addresses >+ $Host=~ s/::ffff://; > $HostLength = length($Host); > $HostSpaceLength = 26 - $HostLength; > $CountLength = length("$Conns"); >@@ -114,13 +181,19 @@ if ( ( $Detail >= 10 ) and (keys %Login) > foreach my $User (keys %Login) { > print "\n\n User $User:"; > $UserCount = 0; >+ $NumHosts = 0; > foreach $Host (keys %{$Login{$User}}) { >+ $NumHosts++; > $HostCount = $Login{$User}{$Host}; >+# Cleanly display IPv4 addresses >+ $Host=~ s/::ffff://; > print "\n From $Host: $HostCount Time(s)"; > $UserCount += $HostCount; > } > $LoginCount += $UserCount; >+ if ($NumHosts > 1) { > print "\n Total: $UserCount Time(s)"; >+ } > } > print "\n\nTotal: $LoginCount successful logins"; > } >--- logwatch/default.conf/services/dovecot.conf.orig 2007-03-25 02:24:52.000000000 -0500 >+++ logwatch/default.conf/services/dovecot.conf 2007-11-22 05:16:21.000000000 -0600 >@@ -1,7 +1,11 @@ > ########################################################################### >-# $Id: dovecot.conf,v 1.2 2005/12/07 04:31:44 bjorn Exp $ >+# $Id: dovecot.conf,v 1.3 2006/08/13 21:05:03 bjorn Exp $ > ########################################################################### > # $Log: dovecot.conf,v $ >+# Revision 1.3 2006/08/13 21:05:03 bjorn >+# Changed OnlyService to include dovecot for compatibility with Dovecot 1.0 >+# based on patches by Mark Nienberg; modification by Patrick Vande Walle. >+# > # Revision 1.2 2005/12/07 04:31:44 bjorn > # Added $dovecot_ignore_host. > # >@@ -25,7 +29,7 @@ Title = "Dovecot" > # Which logfile group... > LogFile = maillog > >-*OnlyService = (imap-login|pop3-login) >+*OnlyService = (imap-login|pop3-login|dovecot) > > # Variable $dovecot_ignore_host is used to filter out hosts that login > # successfully. This commented-out example filters out reserved local
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 424031
: 287891 |
287921