From 04bee16dcee60d70efb2a102d519df1a24af4f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kl=C3=AD=C4=8D?= Date: Wed, 16 Dec 2009 11:20:03 +0000 Subject: [PATCH] Fixed error in the RE that matches lost connection lines in postfix script --- logwatch-7.3.6-lost-connection.patch | 12 ++++++++++++ logwatch.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 logwatch-7.3.6-lost-connection.patch diff --git a/logwatch-7.3.6-lost-connection.patch b/logwatch-7.3.6-lost-connection.patch new file mode 100644 index 0000000..e40dca5 --- /dev/null +++ b/logwatch-7.3.6-lost-connection.patch @@ -0,0 +1,12 @@ +diff -up logwatch-7.3.6/scripts/services/postfix.lost-connection logwatch-7.3.6/scripts/services/postfix +--- logwatch-7.3.6/scripts/services/postfix.lost-connection 2009-12-16 12:06:01.208255271 +0100 ++++ logwatch-7.3.6/scripts/services/postfix 2009-12-16 12:06:17.115378576 +0100 +@@ -1536,7 +1536,7 @@ while ( <> ) { + # end of $re_QID section + + # see also ConnectionLost in $re_QID section +- elsif ( ($reason,$host,$hostip) = ($p1 =~ /lost connection (after [^ ]*) (\(\d+ bytes\) )?from ([^[]*)\[($re_IP|unknown)\]$/o )) { ++ elsif ( ($reason,$host,$hostip) = ($p1 =~ /lost connection (after [^ ]*) (?:\(\d+ bytes\) )?from ([^[]*)\[($re_IP|unknown)\]$/o )) { + unless ($hostip =~ /unknown/) { + #TD lost connection after DATA (0 bytes) from mail.example.com[192.168.0.1] + #TD lost connection after CONNECT from mail.example.com[192.168.0.1] diff --git a/logwatch.spec b/logwatch.spec index 415b9d5..79db2c9 100644 --- a/logwatch.spec +++ b/logwatch.spec @@ -54,7 +54,10 @@ Patch54: logwatch-7.3.6-exim2.patch Patch55: logwatch-7.3.6-removeservice.patch Patch56: logwatch-7.3.6-cron_conf.patch Patch57: logwatch-7.3.6-named5.patch +# Sent to upstream. Patch58: logwatch-7.3.6-iptables.patch +# Not sent to upstream. +Patch59: logwatch-7.3.6-lost-connection.patch Requires: textutils sh-utils grep mailx Requires: perl(Date::Manip) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -117,6 +120,7 @@ of the package on many systems. %patch56 -p1 %patch57 -p1 %patch58 -p1 +%patch59 -p1 rm -f scripts/services/*.orig %build @@ -241,7 +245,8 @@ rm -rf %{buildroot} %changelog * Wed Dec 2 2009 Karel Klic 7.3.6-49 -- Add 802.1q subinterface support to iptables report (#507743) +- Add 802.1q subinterface support to iptables report; iptables.patch (#507743) +- Fixed error in the RE that matches "lost connection" lines in postfix script; lost-connection.patch (#525903) * Tue Aug 11 2009 Ivana Varekova 7.3.6-48 - parse a few unmatched entries in named script (#513853)