From 635b2d2fdf790e110d11922ea6d83c60e7584dcd Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Sat, 3 Oct 2009 08:18:36 +0000 Subject: [PATCH] [svn-inject] Applying Debian modifications to trunk --- debian/README.Debian | 6 +++ debian/changelog | 62 +++++++++++++++++++++++++++ debian/control | 16 +++++++ debian/copyright | 32 ++++++++++++++ debian/dirs | 2 + debian/example.cron.daily | 10 +++++ debian/example.cron.weekly | 10 +++++ debian/rules | 88 ++++++++++++++++++++++++++++++++++++++ pflogsumm.pl | 5 ++- 9 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/example.cron.daily create mode 100644 debian/example.cron.weekly create mode 100755 debian/rules diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..c384397 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +pflogsumm.pl has been renamed to pflogsumm as the programming language +used shouldn't be in the name of the program. A symlink has been added +to the old name, so that scripts and cronjobs don't break. + + + -- Pascal Hakim , Wed Jan 21 17:14:34 2004 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..4f2c114 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,62 @@ +pflogsumm (1.1.0-3) unstable; urgency=low + + * Upload prepared by Ralf Hildebrandt + * Patches by Fridtjof Busse + * Bumped DH_COMPAT + * Fixed some perl warnings + (Closes: #260210) + * Deal with newer versions of postfix which log DSN status codes + (Closes: #303899) + + -- Pascal Hakim Fri, 14 Apr 2006 21:30:05 +1000 + +pflogsumm (1.1.0-2) unstable; urgency=low + + * Fixed symlink to old name of pflogsumm and added a note to + README.Debian about it. + (Closes: #228364) + + -- Pascal Hakim Wed, 21 Jan 2004 17:12:05 +1100 + +pflogsumm (1.1.0-1) unstable; urgency=low + + * New maintainer (pasc@debian.org) + (Closes: #228042) + * Update to Standards-Version 3.6.1 + * Re-packaged as Debian non-native + * New upstream release + + Package updated + (Closes: #225816) + + Catches new format of rejects + (Closes: #203011) + + Fixes VERP-handling + (Closes: #177397) + * Renamed binary + (Closes: #188898) + + -- Pascal Hakim Fri, 16 Jan 2003 23:20:03 +1100 + +pflogsumm (1.0.10-1) unstable; urgency=low + + * New upstream release, fixes problems with postfix versions 2.0 and + beyond (Closes: #177564) + + -- Stijn de Bekker Mon, 10 Mar 2003 14:23:53 +0100 + +pflogsumm (1.0.4-1) unstable; urgency=low + + * New upstream release. + + -- Stijn de Bekker Sun, 14 Apr 2002 21:45:53 +0200 + +pflogsumm (1.0.3-1) unstable; urgency=low + + * New upstream release. + + -- Stijn de Bekker Wed, 20 Jun 2001 20:02:30 +0200 + +pflogsumm (0.0.20000925-1) unstable; urgency=low + + * Initial Release (Closes: #90244). + + -- Stijn de Bekker Tue, 20 Mar 2001 23:03:47 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9ff77da --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: pflogsumm +Section: admin +Priority: optional +Maintainer: Pascal Hakim +Build-Depends-Indep: debhelper (>> 4.0.0) +Standards-Version: 3.6.2 + +Package: pflogsumm +Architecture: all +Depends: perl5, libdate-calc-perl +Description: Postfix log entry summarizer + pflogsumm is designed to provide an over-view of postfix + activity, with just enough detail to give the administrator + a "heads up" for potential trouble spots. + . + Homepage: http://jimsun.linxnet.com/postfix_contrib.html diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..fa40f81 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Stijn de Bekker on +Wed, 20 Jun 2001 20:04:19 +0100. + +It was downloaded from + http://jimsun.linxnet.com/downloads/ + + +Upstream Author: James S. Seymour + + +Copyright: + +All of the programs, applications, and utilities (hereinafter referred to +as "programs") on this page are Copyright (C) 1998-99 James S. Seymour. + +These programs are free software; you can redistribute them and/or modify +them under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +These programs are distributed in the hope that they will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License may be found in `/usr/share/common-licenses/GPL'. + +You may receive a copy of the GNU General Public License along with +these programs; if not, write to the Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..9fa20d1 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +/usr/sbin +/usr/share/man/man1 diff --git a/debian/example.cron.daily b/debian/example.cron.daily new file mode 100644 index 0000000..9f8be2a --- /dev/null +++ b/debian/example.cron.daily @@ -0,0 +1,10 @@ +#!/bin/sh +# +# Debian pflogsumm daily cron script +# +# This script analyses the logfile for statistics and problems. +# + +if [ -x /usr/sbin/pflogsumm.pl ]; then + /usr/sbin/pflogsumm.pl -d yesterday --problems_first /var/log/mail.log +fi diff --git a/debian/example.cron.weekly b/debian/example.cron.weekly new file mode 100644 index 0000000..4d67bda --- /dev/null +++ b/debian/example.cron.weekly @@ -0,0 +1,10 @@ +#!/bin/sh +# +# Debian pflogsumm weekly cron script +# +# This script analyses the logfile for statistics and problems. +# + +if [ -x /usr/sbin/pflogsumm.pl ]; then + /usr/sbin/pflogsumm.pl --problems_first /var/log/mail.log* +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..fa4571a --- /dev/null +++ b/debian/rules @@ -0,0 +1,88 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=4 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + #/usr/bin/docbook-to-man debian/pflogsumm.sgml > pflogsumm.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/pflogsumm. + #$(MAKE) install DESTDIR=$(CURDIR)/debian/pflogsumm + cp pflogsumm.pl $(CURDIR)/debian/pflogsumm/usr/sbin/pflogsumm + cd $(CURDIR)/debian/pflogsumm/usr/sbin && ln -s pflogsumm pflogsumm.pl + cp pflogsumm.1 $(CURDIR)/debian/pflogsumm/usr/share/man/man1 + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion 2 + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs rem_smtpd_stats_supp.pl pflogsumm-faq.txt README ToDo + dh_installexamples debian/example.cron.daily debian/example.cron.weekly +# dh_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installmanpages +# dh_installinfo +# dh_undocumented + dh_installchangelogs ChangeLog + dh_link + dh_strip + dh_compress + cd $(CURDIR)/debian/pflogsumm/usr/share/man/man1/ && ln -s pflogsumm.1.gz pflogsumm.pl.1.gz + + dh_fixperms + # You may want to make some executables suid here. +# dh_suidregister +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/pflogsumm.pl b/pflogsumm.pl index 465fbcb..d584327 100755 --- a/pflogsumm.pl +++ b/pflogsumm.pl @@ -696,7 +696,7 @@ while(<>) { } } elsif((($addr, $relay, $delay, $status, $toRmdr) = $logRmdr =~ - /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), status=(\S+)(.*)$/o) >= 4) + /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), (?:delays=[^,]+, )?(?:dsn=\d+\.\d+\.\d+, )?status=(\S+)(.*)$/o) >= 4) { if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) { @@ -1449,6 +1449,9 @@ sub adj_time_units { sub said_string_trimmer { my($trimmedString, $maxLen) = @_; + # If theres a "deferred ()" in the logfile. + if (not defined $trimmedString) { return "" }; + while(length($trimmedString) > $maxLen) { if($trimmedString =~ /^.* said: /o) { $trimmedString =~ s/^.* said: //o; -- 2.39.2