summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-03-06 14:25:13 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2022-03-06 16:45:03 +0000
commit42ed39da5af85552a35626348bb77e5576e18aa4 (patch)
tree4c3a5b225dc5ac4b4fc7dc3af971da9685499549 /src
parent80dceaeced16838c894429d5c15d8699ddec5542 (diff)
Utilities: fix exiqgrep perl syntax, add testcases. Bug 2821
Broken-by: df618101a5
Diffstat (limited to 'src')
-rw-r--r--src/src/exiqgrep.src9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/src/exiqgrep.src b/src/src/exiqgrep.src
index 9fee423e4..9dfa2c735 100644
--- a/src/src/exiqgrep.src
+++ b/src/src/exiqgrep.src
@@ -55,12 +55,14 @@ if ($ARGV[0] eq '--version') {
exit 0;
}
-if (!getopts('hf:r:y:o:s:C:zxlibRcaG:',\%opt) { &help; exit;}
-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();
@@ -77,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 <regexp> Match sender address sender (field is "< >" wrapped)