X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexiqgrep.src;h=afecbffeec250e8183f2eaed80cecf0957fa1fa5;hb=3d1451ea26e96e63a22d96a08dcfe2e80701c75c;hp=75265a2bb37ed0e277c521984ddd7d8bdc0fad71;hpb=196f5966a092d873df256956f6f88d4b5d3cb803;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exiqgrep.src b/src/src/exiqgrep.src index 75265a2bb..afecbffee 100644 --- a/src/src/exiqgrep.src +++ b/src/src/exiqgrep.src @@ -15,7 +15,7 @@ # Routine for extracting the UTC timestamp from message ID # lifted from eximstat utility -# Version 1.1 +# Version 1.2 use strict; use Getopt::Std; @@ -43,8 +43,10 @@ if ($^O eq 'darwin') { # aka MacOS X $base = 62; }; -getopts('hf:r:y:o:s:zxlibRc',\%opt); +getopts('hf:r:y:o:s:C:zxlibRca',\%opt); if ($opt{h}) { &help; exit;} +if ($opt{a}) { $eargs = '-bp'; } +if ($opt{C} && -e $opt{C} && -f $opt{C} && -R $opt{C}) { $eargs .= ' -C '.$opt{C}; } # Read message queue output into hash &collect(); @@ -60,6 +62,7 @@ sub help() { Exim message queue display utility. -h This help message. + -C Specify which exim.conf to use. Selection criteria: -f Match sender address sender (field is "< >" wrapped) @@ -78,6 +81,7 @@ Display options: -i Message IDs only -b Brief Format -R Reverse order + -a All recipients (including delivered) EOF } @@ -115,13 +119,13 @@ sub selection() { foreach my $msg (keys(%id)) { if ($opt{f}) { # Match sender address - next unless ($id{$msg}{from} =~ /$opt{f}/); + next unless ($id{$msg}{from} =~ /$opt{f}/i); } if ($opt{r}) { # Match any recipient address my $match = 0; foreach my $rcpt (@{$id{$msg}{rcpt}}) { - $match++ if ($rcpt =~ /$opt{r}/); + $match++ if ($rcpt =~ /$opt{r}/i); } next unless ($match); }