X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexiqgrep.src;h=0661c57920a65a8190f1223807238a194e194813;hb=4f7a93c27e3d43b44c42d3fc503f03b9b42ca622;hp=c26da684bfae3f136c9414930df73e6ec68a615b;hpb=983da87847289c7f5373e4d5933d379f211b7613;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exiqgrep.src b/src/src/exiqgrep.src index c26da684b..0661c5792 100644 --- a/src/src/exiqgrep.src +++ b/src/src/exiqgrep.src @@ -2,6 +2,8 @@ # Utility for searching and displaying queue information. # Written by Matt Hubbard 15 August 2002 +# +# Copyright (c) The Exim Maintainers 2021 - 2022 # Except when they appear in comments, the following placeholders in this # source are replaced when it is turned into a runnable script: @@ -49,15 +51,18 @@ if ($^O eq 'darwin') { # aka MacOS X if ($ARGV[0] eq '--version') { print basename($0) . ": $0\n", "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n", - "perl(runtime): $^V\n"; + "perl(runtime): $]\n"; exit 0; } -getopts('hf:r:y:o:s:C:zxlibRca',\%opt); -if ($ARGV[0]) { &help; exit;} -if ($opt{h}) { &help; exit;} +if (!getopts('hf:r:y:o:s:C:zxlibRcaG:E:',\%opt)) { &help; exit; } +if ($opt{h}) { &help; exit; } +if ($ARGV[0] || !($opt{f} || $opt{r} || $opt{s} || $opt{y} || $opt{o} || $opt{z} || $opt{x} || $opt{c})) + { &help; exit(1); } if ($opt{a}) { $eargs = '-bp'; } if ($opt{C} && -e $opt{C} && -f $opt{C} && -R $opt{C}) { $eargs .= ' -C '.$opt{C}; } +if ($opt{G}) { $eargs .= ' -qG'.$opt{G}; } +if ($opt{E}) { $exim = $opt{E}; } # Read message queue output into hash &collect(); @@ -74,6 +79,7 @@ Exim message queue display utility. -h This help message. -C Specify which exim.conf to use. + -E Specify exim binary to use. Selection criteria: -f Match sender address sender (field is "< >" wrapped) @@ -83,6 +89,7 @@ Selection criteria: -o Message older than -z Frozen messages only (exclude non-frozen) -x Non-frozen messages only (exclude frozen) + -G Match in given queue only [ NB: for regexps, provided string sits in // ]