From: <ste...@us...> - 2014-09-09 09:35:44
|
Revision: 220 http://sourceforge.net/p/logwatch/code/220 Author: stefjakobs Date: 2014-09-09 09:35:36 +0000 (Tue, 09 Sep 2014) Log Message: ----------- sendmail: correct handling of ipv6 addresses (Thanks: Robert Scheck) Modified Paths: -------------- scripts/services/sendmail Modified: scripts/services/sendmail =================================================================== --- scripts/services/sendmail 2014-09-09 09:32:34 UTC (rev 219) +++ scripts/services/sendmail 2014-09-09 09:35:36 UTC (rev 220) @@ -905,14 +905,14 @@ } elsif ($ThisLine=~ /^headers too large .* from (.*) during message collect$/) { $LargeHdrs{$1}++; # file=srvrsmtp.c, LogLevel>5, LOG_INFO - } elsif ($ThisLine=~ /(\S*) ?\[([0-9\.]+)\](?: \(may be forged\))?: (\S+) (\S+) \[rejected\]/i) { - chomp($Host=$2." ". (defined($1) ? "(".$1.")" : "(unresolved)") ); - $Luser=$4; - $RejCmd=uc $3; + } elsif ($ThisLine=~ /(\S*) ?\[(IPv6:)?([0-9A-F\.:]+)\](?: \(may be forged\))?: (\S+) (\S+) \[rejected\]/i) { + chomp($Host=$3." ". (defined($1) ? "(".$1.")" : "(unresolved)") ); + $Luser=$5; + $RejCmd=uc $4; $Abuse{$Host}{$Luser}{$RejCmd}++; # file=srvrsmtp.c, LogLevel>5, LOG_INFO - } elsif ( $ThisLine =~ /\[([0-9\.]+)]: ETRN (\S+)/ ) { - chomp($ETRN=$2." from ".$1); + } elsif ( $ThisLine =~ /\[(IPv6:)?([0-9A-F\.:]+)]: ETRN (\S+)/i ) { + chomp($ETRN=$3." from ".$2); $ETRNs{$ETRN}++; # file=conf.c, LogLevel>8, LOG_NOTICE } elsif ( $ThisLine =~ /rejecting connections on daemon [^ ]+: load average: ([0-9]+)/ ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |