X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsrc%2Fexiqsumm.src;h=3918ab0b83ef77e2d7c45399846f652e406bb022;hb=refs%2Fheads%2Ffix_isis_typos;hp=fc5ad26bb56009e6f2484402f842221ec21dede6;hpb=44b2544ecbca17b3903dd56bf499b47063374a13;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exiqsumm.src b/src/src/exiqsumm.src index fc5ad26bb..3918ab0b8 100644 --- a/src/src/exiqsumm.src +++ b/src/src/exiqsumm.src @@ -1,7 +1,12 @@ -#! PERL_COMMAND -w +#! PERL_COMMAND # Mail Queue Summary # Christoph Lameter, 21 May 1997 +# +# Copyright (c) The Exim Maintainers 2023 +# SPDX-License-Identifier: GPL-2.0-or-later +# See the file NOTICE for conditions of use and distribution. + # Modified by Philip Hazel, June 1997 # Bug fix: June 1998 by Philip Hazel # Message sizes not listed by -bp with K or M @@ -27,7 +32,7 @@ # typo. Fix provided by Chris Liddiard. # November 2006 by Jori Hamalainen # Added feature to separate frozen and bounced messages from queue -# Adedd feature to list queue per source - destination pair +# Added feature to list queue per source - destination pair # Changed regexps to compile once to very minor speed optimization # Short circuit for empty lines # @@ -41,6 +46,17 @@ # Slightly modified sub from eximstats +use warnings; +BEGIN { pop @INC if $INC[-1] eq '.' }; +use File::Basename; + +if (@ARGV && ($ARGV[0] eq '--version' || ($ARGV[0] eq '-v'))) { + print basename($0) . ": $0\n", + "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n", + "perl(runtime): $]\n"; + exit 0; +} + sub print_volume_rounded { my($x) = pop @_; if ($x < 10000) @@ -106,9 +122,12 @@ if (/^$/o || /^\s*D\s\S+/o) { next; } # If it's the first line of a message, pick out the data. Note: it may # have text after the final > (e.g. frozen) so don't insist that it ends >. -if (/^([\d\s]{2,3}\w)\s+(\S+)\s(\S+)\s\<(\S*)\>/o) +if (/^ (?[\d\s]{2,3}\w) + \s+ (?\S+) + \s (?\S+) + \s\< (?\S*) \>/ox) { - ($age,$size,$id,$src)=($1,$2,$3,$4); + ($age,$size,$id,$src)=($+{age},$+{size},$+{id},$+{src}); $src =~ s/([^\@]*)\@(.*?)$/$2/o; if (/\*\*\*\sfrozen\s\*\*\*/o) { $frozen=1; } else { $frozen=0; } if ($src eq "") { $bounce=1; $src="<>"; } else { $bounce=0; }