[exim-dev] exiqgrep trivial patch

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Milan Kocian
Data:  
Para: exim-dev
Asunto: [exim-dev] exiqgrep trivial patch
helo,

this patch adds possibility to use alternative configuration in exim.


--- a/exiqgrep    2011-01-30 22:19:01.000000000 +0100
+++ b/exiqgrep    2011-05-02 12:50:44.000000000 +0200
@@ -44,7 +44,7 @@
   $base = 62;
 };


-getopts('hf:r:y:o:s:zxlibRc',\%opt);
+getopts('hf:r:y:o:s:C:zxlibRc',\%opt);
if ($opt{h}) { &help; exit;}

 # Read message queue output into hash
@@ -79,11 +79,17 @@
     -i        Message IDs only
     -b        Brief Format
     -R        Reverse order
+
+Exim options:
+    -C <file>    Path to alternative configuration
+
 EOF
 }


 sub collect() {
-    open(QUEUE,"$exim $eargs |") or die("Error openning pipe: $!\n");
+    my $cparam = '';
+    $cparam = "-C $opt{C}" if (defined($opt{C}));
+    open(QUEUE,"$exim $eargs $cparam |") or die("Error openning pipe: $!\n");
     while(<QUEUE>) {
         chomp();
         my $line = $_;



Best regards,
(please cc, I'm not in list)

--
Milan Kocian