From 34be7c4f8631d14abea87c59aeb4b6e902236d4f Mon Sep 17 00:00:00 2001 From: jakob Date: Wed, 17 Sep 2008 06:49:25 +0000 Subject: [PATCH] update to pflogsumm v1.1.2; from Giovanni Bechis --- mail/pflogsumm/Makefile | 5 +- mail/pflogsumm/distinfo | 10 +- mail/pflogsumm/patches/patch-pflogsumm_pl | 22 +- mail/pflogsumm/patches/patch_rus-pflogsumm_pl | 328 ------------------ 4 files changed, 13 insertions(+), 352 deletions(-) delete mode 100644 mail/pflogsumm/patches/patch_rus-pflogsumm_pl diff --git a/mail/pflogsumm/Makefile b/mail/pflogsumm/Makefile index 148fa5e20da..8d2f68ad44e 100644 --- a/mail/pflogsumm/Makefile +++ b/mail/pflogsumm/Makefile @@ -1,9 +1,8 @@ -# $OpenBSD: Makefile,v 1.6 2007/09/16 00:17:06 merdely Exp $ +# $OpenBSD: Makefile,v 1.7 2008/09/17 06:49:25 jakob Exp $ COMMENT= Postfix log entry summarizer -DISTNAME= pflogsumm-1.1.0 -PKGNAME= ${DISTNAME}p0 +DISTNAME= pflogsumm-1.1.2 CATEGORIES= mail MASTER_SITES+= http://jimsun.linxnet.com/downloads/ diff --git a/mail/pflogsumm/distinfo b/mail/pflogsumm/distinfo index ed092ccdf43..49b1ed68705 100644 --- a/mail/pflogsumm/distinfo +++ b/mail/pflogsumm/distinfo @@ -1,5 +1,5 @@ -MD5 (pflogsumm-1.1.0.tar.gz) = H3j8ryo27DUg7P8oakUlGg== -RMD160 (pflogsumm-1.1.0.tar.gz) = q0ryKju5k8o7jj0bWAUvTmmuiQw= -SHA1 (pflogsumm-1.1.0.tar.gz) = jk768ZJXO7FLZP/cNLNUgCCkohg= -SHA256 (pflogsumm-1.1.0.tar.gz) = 4609eYudv7M6+FmUC49Ggaj+3kXXRDNqpoJCteLEBBc= -SIZE (pflogsumm-1.1.0.tar.gz) = 43588 +MD5 (pflogsumm-1.1.2.tar.gz) = xrtDNESoNWQQGqMCWcyEmw== +RMD160 (pflogsumm-1.1.2.tar.gz) = cAWaov8R7xBNuqqI97TPRqEISOc= +SHA1 (pflogsumm-1.1.2.tar.gz) = jbRWUyLVXSipH+QfGt1JXTn499Y= +SHA256 (pflogsumm-1.1.2.tar.gz) = MvQT5r9D96YvSQnMgJ95KbDA0pof5eMTHdgFQSmCfbs= +SIZE (pflogsumm-1.1.2.tar.gz) = 44865 diff --git a/mail/pflogsumm/patches/patch-pflogsumm_pl b/mail/pflogsumm/patches/patch-pflogsumm_pl index b691d671bca..c5dd2d1b4cf 100644 --- a/mail/pflogsumm/patches/patch-pflogsumm_pl +++ b/mail/pflogsumm/patches/patch-pflogsumm_pl @@ -1,6 +1,5 @@ -$OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $ ---- pflogsumm.pl.orig 2004-01-28 13:38:53.000000000 +1000 -+++ pflogsumm.pl 2004-01-28 13:39:29.000000000 +1000 +--- pflogsumm.pl.orig Sun Jun 29 15:46:01 2008 ++++ pflogsumm.pl Fri Sep 12 19:09:05 2008 @@ -4,13 +4,13 @@ eval 'exec perl -S $0 "$@"' =head1 NAME @@ -8,7 +7,7 @@ $OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $ -pflogsumm.pl - Produce Postfix MTA logfile summary +pflogsumm - Produce Postfix MTA logfile summary - Copyright (C) 1998-2003 by James S. Seymour, Release 1.1.0. + Copyright (C) 1998-2007 by James S. Seymour, Release 1.1.2. =head1 SYNOPSIS @@ -17,7 +16,7 @@ $OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $ [--verp_mung[=]] [--verbose_msg_detail] [--iso_date_time] [-m|--uucp_mung] [-i|--ignore_case] [--smtpd_stats] [--mailq] [--problems_first] [--rej_add_from] [--no_bounce_detail] -@@ -18,7 +18,7 @@ Copyright (C) 1998-2003 by James S. Seym +@@ -18,7 +18,7 @@ Copyright (C) 1998-2007 by James S. Seymour, Release 1 [--no_smtpd_warnings] [--zero_fill] [--syslog_name=string] [file1 [filen]] @@ -26,7 +25,7 @@ $OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $ If no file(s) specified, reads from stdin. Output is to stdout. -@@ -119,7 +119,7 @@ Copyright (C) 1998-2003 by James S. Seym +@@ -119,7 +119,7 @@ Copyright (C) 1998-2007 by James S. Seymour, Release 1 The message may be delivered long-enough after the (last) qmgr log entry that the information is not in the log(s) processed by a particular run of @@ -35,7 +34,7 @@ $OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $ size" and the total for "bytes delivered." These are normally reported by pflogsumm as "Messages with no size data." -@@ -216,15 +216,15 @@ Copyright (C) 1998-2003 by James S. Seym +@@ -216,15 +216,15 @@ Copyright (C) 1998-2007 by James S. Seymour, Release 1 Produce a report of previous day's activities: @@ -63,12 +62,3 @@ $OpenBSD: patch-pflogsumm_pl,v 1.4 2005/06/30 13:22:23 jakob Exp $ $usageMsg = "usage: $progName -[eq] [-d ] [-h ] [-u ] [--verp_mung[=]] [--verbose_msg_detail] [--iso_date_time] -@@ -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=([^,]+), (?:dsn=\d+\.\d+\.\d+, )?status=(\S+)(.*)$/o) >= 4) - { - - if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) { diff --git a/mail/pflogsumm/patches/patch_rus-pflogsumm_pl b/mail/pflogsumm/patches/patch_rus-pflogsumm_pl deleted file mode 100644 index f45d079ed6d..00000000000 --- a/mail/pflogsumm/patches/patch_rus-pflogsumm_pl +++ /dev/null @@ -1,328 +0,0 @@ -$OpenBSD: patch_rus-pflogsumm_pl,v 1.1 2005/06/30 13:22:23 jakob Exp $ ---- pflogsumm.pl.orig 2004-01-28 14:13:06.000000000 +1000 -+++ pflogsumm.pl 2004-01-28 14:39:09.000000000 +1000 -@@ -4,13 +4,13 @@ eval 'exec perl -S $0 "$@"' - - =head1 NAME - --pflogsumm.pl - Produce Postfix MTA logfile summary -+pflogsumm - Produce Postfix MTA logfile summary - - Copyright (C) 1998-2003 by James S. Seymour, Release 1.1.0. - - =head1 SYNOPSIS - -- pflogsumm.pl -[eq] [-d ] [-h ] [-u ] -+ pflogsumm -[eq] [-d ] [-h ] [-u ] - [--verp_mung[=]] [--verbose_msg_detail] [--iso_date_time] - [-m|--uucp_mung] [-i|--ignore_case] [--smtpd_stats] [--mailq] - [--problems_first] [--rej_add_from] [--no_bounce_detail] -@@ -18,7 +18,7 @@ Copyright (C) 1998-2003 by James S. Seym - [--no_smtpd_warnings] [--zero_fill] [--syslog_name=string] - [file1 [filen]] - -- pflogsumm.pl -[help|version] -+ pflogsumm -[help|version] - - If no file(s) specified, reads from stdin. Output is to stdout. - -@@ -119,7 +119,7 @@ Copyright (C) 1998-2003 by James S. Seym - The message may be delivered long-enough after the - (last) qmgr log entry that the information is not in - the log(s) processed by a particular run of -- pflogsumm.pl. This throws off "Recipients by message -+ pflogsumm. This throws off "Recipients by message - size" and the total for "bytes delivered." These are - normally reported by pflogsumm as "Messages with no - size data." -@@ -216,15 +216,15 @@ Copyright (C) 1998-2003 by James S. Seym - - Produce a report of previous day's activities: - -- pflogsumm.pl -d yesterday /var/log/maillog -+ pflogsumm -d yesterday /var/log/maillog - - A report of prior week's activities (after logs rotated): - -- pflogsumm.pl /var/log/maillog.0 -+ pflogsumm /var/log/maillog.0 - - What's happened so far today: - -- pflogsumm.pl -d today /var/log/maillog -+ pflogsumm -d today /var/log/maillog - - Crontab entry to generate a report of the previous day's activity - at 10 minutes after midnight. -@@ -447,7 +447,7 @@ for (0 .. 23) { - $smtpdPerHr[$_] = [0,0,0]; - } - --$progName = "pflogsumm.pl"; -+$progName = "pflogsumm"; - $usageMsg = - "usage: $progName -[eq] [-d ] [-h ] [-u ] - [--verp_mung[=]] [--verbose_msg_detail] [--iso_date_time] -@@ -809,40 +809,40 @@ if(my $msgsTotal = $msgsDlvrd + $msgsRjc - } - - if(defined($dateStr)) { -- print "Postfix log summaries for $dateStr\n"; -+ print "Статистика работы Postfix на $dateStr\n"; - } - - print "\nGrand Totals\n------------\n"; --print "messages\n\n"; --printf " %6d%s received\n", adj_int_units($msgsRcvd); --printf " %6d%s delivered\n", adj_int_units($msgsDlvrd); --printf " %6d%s forwarded\n", adj_int_units($msgsFwdd); --printf " %6d%s deferred", adj_int_units($msgsDfrd); --printf " (%d%s deferrals)", adj_int_units($msgsDfrdCnt) if($msgsDfrdCnt); -+print "Сообщений\n\n"; -+printf " %6d%s принято\n", adj_int_units($msgsRcvd); -+printf " %6d%s доставлено\n", adj_int_units($msgsDlvrd); -+printf " %6d%s перенаправлено\n", adj_int_units($msgsFwdd); -+printf " %6d%s отложено", adj_int_units($msgsDfrd); -+printf " (%d%s попыток отправить)", adj_int_units($msgsDfrdCnt) if($msgsDfrdCnt); - print "\n"; --printf " %6d%s bounced\n", adj_int_units($msgsBncd); --printf " %6d%s rejected (%d%%)\n", adj_int_units($msgsRjctd), $msgsRjctdPct; --printf " %6d%s reject warnings\n", adj_int_units($msgsWrnd); --printf " %6d%s held\n", adj_int_units($msgsHld); --printf " %6d%s discarded (%d%%)\n", adj_int_units($msgsDscrdd), $msgsDscrddPct; -+printf " %6d%s возвращено отправителю\n", adj_int_units($msgsBncd); -+printf " %6d%s отброшено (%d%%)\n", adj_int_units($msgsRjctd), $msgsRjctdPct; -+printf " %6d%s предупреждений по отбросу\n", adj_int_units($msgsWrnd); -+printf " %6d%s удержано\n", adj_int_units($msgsHld); -+printf " %6d%s отвергнуто (%d%%)\n", adj_int_units($msgsDscrdd), $msgsDscrddPct; - print "\n"; --printf " %6d%s bytes received\n", adj_int_units($sizeRcvd); --printf " %6d%s bytes delivered\n", adj_int_units($sizeDlvrd); --printf " %6d%s senders\n", adj_int_units($sendgUserCnt); --printf " %6d%s sending hosts/domains\n", adj_int_units($sendgDomCnt); --printf " %6d%s recipients\n", adj_int_units($recipUserCnt); --printf " %6d%s recipient hosts/domains\n", adj_int_units($recipDomCnt); -+printf " %6d%s байт получено\n", adj_int_units($sizeRcvd); -+printf " %6d%s байт доставлено\n", adj_int_units($sizeDlvrd); -+printf " %6d%s отправителей\n", adj_int_units($sendgUserCnt); -+printf " %6d%s отправители хосты/домены\n", adj_int_units($sendgDomCnt); -+printf " %6d%s получателей\n", adj_int_units($recipUserCnt); -+printf " %6d%s получатели хосты/домены\n", adj_int_units($recipDomCnt); - - # ---Begin: SMTPD_STATS_SUPPORT--- - if(defined($opts{'smtpdStats'})) { -- print "\nsmtpd\n\n"; -- printf " %6d%s connections\n", adj_int_units($smtpdConnCnt); -- printf " %6d%s hosts/domains\n", adj_int_units(int(keys %smtpdPerDom)); -- printf " %6d avg. connect time (seconds)\n", -+ print "\n\nСтатистика демона smtp\n"; -+ printf " %6d%s соединений\n", adj_int_units($smtpdConnCnt); -+ printf " %6d%s хосты/домены\n", adj_int_units(int(keys %smtpdPerDom)); -+ printf " %6d среднее время соединения (секунды)\n", - $smtpdConnCnt > 0? ($smtpdTotTime / $smtpdConnCnt) + .5 : 0; - { - my ($sec, $min, $hr) = get_smh($smtpdTotTime); -- printf " %2d:%02d:%02d total connect time\n", -+ printf " %2d:%02d:%02d общее время соединений\n", - $hr, $min, $sec; - } - } -@@ -867,42 +867,42 @@ if(defined($opts{'smtpdStats'})) { - } - # ---End: SMTPD_STATS_SUPPORT--- - --print_user_data(\%sendgUser, "Senders by message count", $msgCntI, $opts{'u'}, $opts{'q'}); --print_user_data(\%recipUser, "Recipients by message count", $msgCntI, $opts{'u'}, $opts{'q'}); --print_user_data(\%sendgUser, "Senders by message size", $msgSizeI, $opts{'u'}, $opts{'q'}); --print_user_data(\%recipUser, "Recipients by message size", $msgSizeI, $opts{'u'}, $opts{'q'}); -+print_user_data(\%sendgUser, "Отправители по количеству сообщений", $msgCntI, $opts{'u'}, $opts{'q'}); -+print_user_data(\%recipUser, "Получатели по количеству сообщений", $msgCntI, $opts{'u'}, $opts{'q'}); -+print_user_data(\%sendgUser, "Отправители по размеру сообщений", $msgSizeI, $opts{'u'}, $opts{'q'}); -+print_user_data(\%recipUser, "Получатели по размеру сообщений", $msgSizeI, $opts{'u'}, $opts{'q'}); - --print_hash_by_key(\%noMsgSize, "Messages with no size data", 0, 1); -+print_hash_by_key(\%noMsgSize, "Сообщений без данных о размере", 0, 1); - - print_problems_reports() unless(defined($opts{'pf'})); - --print_detailed_msg_data(\%msgDetail, "Message detail", $opts{'q'}) if($opts{'e'}); -+print_detailed_msg_data(\%msgDetail, "Собщения (детально)", $opts{'q'}) if($opts{'e'}); - - # Print "problems" reports - sub print_problems_reports { - unless($opts{'noDeferralDetail'}) { -- print_nested_hash(\%deferred, "message deferral detail", $opts{'q'}); -+ print_nested_hash(\%deferred, "Отложенные сообщения (детально)", $opts{'q'}); - } - unless($opts{'noBounceDetail'}) { -- print_nested_hash(\%bounced, "message bounce detail (by relay)", $opts{'q'}); -+ print_nested_hash(\%bounced, "Возвращено отправителю (relay)", $opts{'q'}); - } - unless($opts{'noRejectDetail'}) { -- print_nested_hash(\%rejects, "message reject detail", $opts{'q'}); -- print_nested_hash(\%warns, "message reject warning detail", $opts{'q'}); -- print_nested_hash(\%holds, "message hold detail", $opts{'q'}); -- print_nested_hash(\%discards, "message discard detail", $opts{'q'}); -- } -- print_nested_hash(\%smtpMsgs, "smtp delivery failures", $opts{'q'}); -- print_nested_hash(\%warnings, "Warnings", $opts{'q'}); -- print_nested_hash(\%fatals, "Fatal Errors", 0, $opts{'q'}); -- print_nested_hash(\%panics, "Panics", 0, $opts{'q'}); -- print_hash_by_cnt_vals(\%masterMsgs,"Master daemon messages", 0, $opts{'q'}); -+ print_nested_hash(\%rejects, "Отброшенные сообщения (детально)", $opts{'q'}); -+ print_nested_hash(\%warns, "Предупреждения по отброшенным сообщениям (детально)", $opts{'q'}); -+ print_nested_hash(\%holds, "Удержанные сообщения (детально)", $opts{'q'}); -+ print_nested_hash(\%discards, "Отвергнутые сообщения (детально)", $opts{'q'}); -+ } -+ print_nested_hash(\%smtpMsgs, "Ошибки доставки по smtp", $opts{'q'}); -+ print_nested_hash(\%warnings, "Предупреждения", $opts{'q'}); -+ print_nested_hash(\%fatals, "Фатальные ошибки", 0, $opts{'q'}); -+ print_nested_hash(\%panics, "Паника", 0, $opts{'q'}); -+ print_hash_by_cnt_vals(\%masterMsgs,"Сообщения главного демона", 0, $opts{'q'}); - } - - if($opts{'mailq'}) { - # flush stdout first cuz of asynchronousity - $| = 1; -- print "\nCurrent Mail Queue\n------------------\n"; -+ print "\nСостояние почтовой очереди\n------------------\n"; - system($mailqCmd); - } - -@@ -913,9 +913,9 @@ sub print_per_day_summary { - my $value; - print < $b } keys(%$msgsPerDay)) { -@@ -938,20 +938,20 @@ End_Of_Per_Day_Heading - # (done in a subroutine only to keep main-line code clean) - sub print_per_hour_summary { - my ($rcvPerHr, $dlvPerHr, $dfrPerHr, $bncPerHr, $rejPerHr, $dayCnt) = @_; -- my $reportType = $dayCnt > 1? 'Daily Average' : 'Summary'; -+ my $reportType = $dayCnt > 1? 'Средний за день' : 'Суммарный'; - my ($hour, $value); - print < 0? "(top $cnt)" : ""; -+ my $topCnt = $cnt > 0? "(не отображать более $cnt записей)" : ""; - my $avgDly; - print <{$_}}[$msgCntI]), - adj_int_units(${$hashRef->{$_}}[$msgSizeI]), - adj_int_units(${$hashRef->{$_}}[$msgDfrsI]), -@@ -1010,13 +1012,14 @@ sub print_sending_domain_summary { - my $topCnt = $cnt > 0? "(top $cnt)" : ""; - print <{$_}}[$msgCntI]), - adj_int_units(${$hashRef->{$_}}[$msgSizeI]), - $_; -@@ -1030,10 +1033,10 @@ sub print_user_data { - my($hashRef, $title, $index, $cnt, $quiet) = @_; - my $dottedLine; - return if($cnt == 0); -- $title = sprintf "%s%s", $cnt > 0? "top $cnt " : "", $title; -+ $title = sprintf "%s (%s)", $title, $cnt > 0? "не отображать более $cnt записей " : ""; - unless(%$hashRef) { - return if($quiet); -- $dottedLine = ": none"; -+ $dottedLine = ": нет"; - } else { - $dottedLine = "\n" . "-" x length($title); - } -@@ -1172,7 +1175,7 @@ sub print_hash_by_cnt_vals { - $title = sprintf "%s%s", $cnt? "top $cnt " : "", $title; - unless(%$hashRef) { - return if($quiet); -- $dottedLine = ": none"; -+ $dottedLine = ": нет"; - } else { - $dottedLine = "\n" . "-" x length($title); - } -@@ -1187,7 +1190,7 @@ sub print_hash_by_key { - $title = sprintf "%s%s", $cnt? "first $cnt " : "", $title; - unless(%$hashRef) { - return if($quiet); -- $dottedLine = ": none"; -+ $dottedLine = ": нет"; - } else { - $dottedLine = "\n" . "-" x length($title); - } -@@ -1205,7 +1208,7 @@ sub print_nested_hash { - my $dottedLine; - unless(%$hashRef) { - return if($quiet); -- $dottedLine = ": none"; -+ $dottedLine = ": нет"; - } else { - $dottedLine = "\n" . "-" x length($title); - } -@@ -1249,7 +1252,7 @@ sub print_detailed_msg_data { - my $dottedLine; - unless(%$hashRef) { - return if($quiet); -- $dottedLine = ": none"; -+ $dottedLine = ": нет"; - } else { - $dottedLine = "\n" . "-" x length($title); - }