summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-docbook/spec.xfpt2
-rw-r--r--doc/doc-txt/ChangeLog3
-rw-r--r--src/src/EDITME8
-rw-r--r--src/src/exigrep.src2
4 files changed, 13 insertions, 2 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 9b7ada823..bc34d65b8 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -35713,6 +35713,8 @@ search term.
If the location of a &'zcat'& command is known from the definition of
ZCAT_COMMAND in &_Local/Makefile_&, &'exigrep'& automatically passes any file
whose name ends in COMPRESS_SUFFIX through &'zcat'& as it searches it.
+If the ZCAT_COMMAND is not executable, &'exigrep'& tries to use
+autodetection of some well known compression extensions.
.section "Selecting messages by various criteria (exipick)" "SECTexipick"
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 08fb50f3e..a75c10657 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -89,6 +89,9 @@ HS/01 DNSSEC options (dnssec_require_domains, dnssec_request_domains)
JH/25 Bug 466: Add RFC2322 support for MIME attachment filenames.
Original patch from Alexander Shikoff, worked over by JH.
+HS/02 Bug 1575: exigrep falls back to autodetection of compressed
+ files if ZCAT_COMMAND is not executable.
+
Exim version 4.85
-----------------
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";