summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12) <hs@schlittermann.de>2015-04-26 23:20:29 +0200
committerHeiko Schlittermann (HS12) <hs@schlittermann.de>2015-04-26 23:25:58 +0200
commitfd4c285cd86a1c06acaa34c33cb898c057208ec5 (patch)
treef9710783ae6ec98fab6d33a483d6faa973e3366c /src
parent9c19b270ead379003ece51fb49b83e7ea8b2d25e (diff)
exigrep: fallback to $PATH if zcat is missing. BUG 1575
Diffstat (limited to 'src')
-rw-r--r--src/src/EDITME8
-rw-r--r--src/src/exigrep.src2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/src/EDITME b/src/src/EDITME
index 41b929bdf..866987c25 100644
--- a/src/src/EDITME
+++ b/src/src/EDITME
@@ -876,9 +876,15 @@ COMPRESS_SUFFIX=gz
# If the exigrep utility is fed compressed log files, it tries to uncompress
# them using this command.
+# Leave it empty to enforce autodetection at runtime:
+# ZCAT_COMMAND=
+#
+# Omit the path if you want to use your system's PATH:
+# ZCAT_COMMAND=zcat
+#
+# Or specify the full pathname:
ZCAT_COMMAND=/usr/bin/zcat
-
#------------------------------------------------------------------------------
# Compiling in support for embedded Perl: If you want to be able to
# use Perl code in Exim's string manipulation language and you have Perl
diff --git a/src/src/exigrep.src b/src/src/exigrep.src
index 419fcb54c..1b5bcf8ea 100644
--- a/src/src/exigrep.src
+++ b/src/src/exigrep.src
@@ -224,7 +224,7 @@ if (@ARGV)
foreach (@ARGV)
{
my $filename = $_;
- if ($filename =~ /\.(?:COMPRESS_SUFFIX)$/o)
+ if (-x 'ZCAT_COMMAND' && $filename =~ /\.(?:COMPRESS_SUFFIX)$/o)
{
open(LOG, "ZCAT_COMMAND $filename |") ||
die "Unable to zcat $filename: $!\n";