On Sat, 26 Feb 2000, Thomas Roessler wrote:

> I seem to recall that someone on this list wrote about some clever
> scripts to automate the use of glimpse and mutt to search huge
> e-mail archives.  Any pointers?

For mbox folders you could try something like this:

find ~/Mail -maxdepth 1 -type f | glimpseindex -z -F -H ~/mail-glimpse

and incremental indexing with:

find ~/Mail -maxdepth 1 -type f | glimpseindex -z -F -f -H ~/mail-glimpse

And don't forget to create a file ~/mail-glimpse/.glimpse_filters:

----- schnipp -----
*.gz    gzip -dc
*.Z     gzip -dc
*.bz2   bzip2 -dc
----- schnipp -----

Then you can try to search something with the following script:

---------------------- schnipp ----------------------------
#! /bin/sh

umask 077

tmpdir=${TMPDIR:-/tmp}/glimpse.$$
mkdir $tmpdir || exit 1
trap "rm -rf $tmpdir; exit" 0 1 2 3 15

glimpse -z -H ~/mail-glimpse -y -B -i -h -d '^From ' "$@" \
| formail -s cat \
> $tmpdir/result

mutt -R -f$tmpdir/result
---------------------- schnipp ----------------------------

But be careful with this!  It is quite untested...  But maybe it's an
interesting starting point.

Tschoeeee

        Roland

-- 
 * [EMAIL PROTECTED] * http://www.spinnaker.de/ *

Reply via email to