| Newsgroups |
gmane.comp.log.logwatch.devel |
| Message-ID |
<[email protected]> |
Revision: 79
http://logwatch.svn.sourceforge.net/logwatch/?rev=79&view=rev
Author: opoplawski
Date: 2011-12-21 17:28:39 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
Spamassassin:
- Ignore messages about ajusting number of children
- Consolidate connection from messages and allow certain hosts to be ignored
Modified Paths:
--------------
conf/services/spamassassin.conf
scripts/services/spamassassin
Modified: conf/services/spamassassin.conf
===================================================================
--- conf/services/spamassassin.conf 2011-12-20 22:19:52 UTC (rev 78)
+++ conf/services/spamassassin.conf 2011-12-21 17:28:39 UTC (rev 79)
@@ -8,4 +8,9 @@
*OnlyService = spamd
*RemoveHeaders
+# Ignore connections from these hosts.
+# The value is a regular expression that the hostname plus IP address is matched
+# against. Separate multiple hosts/IPs with |
+# $ignore_connections = myspamclient.mydomain
+
# vi: shiftwidth=3 tabstop=3 et
Modified: scripts/services/spamassassin
===================================================================
--- scripts/services/spamassassin 2011-12-20 22:19:52 UTC (rev 78)
+++ scripts/services/spamassassin 2011-12-21 17:28:39 UTC (rev 79)
@@ -41,6 +41,7 @@
my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
+my $Ignore_connections = $ENV{'ignore_connections'};
$StillRoot = 0;
$CleanTotal = 0;
@@ -50,6 +51,7 @@
my %Clean;
my %Spam;
my %Users;
+my %Connections;
#Todo
# meta test DIGEST_MULTIPLE has undefined dependency 'DCC_CHECK' : 2 Time(s)
@@ -74,6 +76,7 @@
( $ThisLine =~ m/^server successfully spawned child process, / ) or
( $ThisLine =~ m/^removing stderr method/ ) or
( $ThisLine =~ m/^server pid:/ ) or
+ ( $ThisLine =~ m/^adjust: \d+ idle children (less|more) than \d+ (min|max)imum idle children/ ) or
0 # Always last in the list, so all above can say "or" at the end
) {
; # We don't care about these
@@ -85,6 +88,8 @@
$Users{ $User}++;
} elsif ( $ThisLine =~ m/still running as root: / ) {
$StillRoot++;
+ } elsif ( $ThisLine =~ m/^connection from (.*) at port / ) {
+ $Connections{$1}++;
} elsif ( $ThisLine =~ m/\bchild\b/ ) {
chomp($ThisLine);
# Many perl errors report pseudo-line-numbers, e.g.
@@ -140,6 +145,18 @@
}
}
+if (keys %Connections) {
+ my $header_printed = 0;
+ foreach my $connection ( sort {$a cmp $b} keys %Connections ) {
+ if ($Ignore_connections && $connection =~ /$Ignore_connections/) { next; }
+ if (!$header_printed) {
+ print "\nConnections from:\n";
+ $header_printed = 1;
+ }
+ print " $connection : $Connections{$connection} Time(s)\n";
+ }
+}
+
if (keys %OtherList) {
print "\n**Unmatched Entries**\n";
foreach $line (sort {$OtherList{$b}<=>$OtherList{$a} } keys %OtherList) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev