X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/983da87847289c7f5373e4d5933d379f211b7613..d945e180cbe2b26392fb21f7ae4dd2ccc603a81b:/src/src/exiqsumm.src diff --git a/src/src/exiqsumm.src b/src/src/exiqsumm.src index 97cacdd63..3918ab0b8 100644 --- a/src/src/exiqsumm.src +++ b/src/src/exiqsumm.src @@ -2,6 +2,11 @@ # 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 @@ -45,10 +50,10 @@ use warnings; BEGIN { pop @INC if $INC[-1] eq '.' }; use File::Basename; -if ($ARGV[0] eq '--version') { +if (@ARGV && ($ARGV[0] eq '--version' || ($ARGV[0] eq '-v'))) { print basename($0) . ": $0\n", "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n", - "perl(runtime): $^V\n"; + "perl(runtime): $]\n"; exit 0; } @@ -117,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; }