This file is indexed.

/usr/share/doc/swish++/examples/email_indexing/swishmutt.sh is in swish++ 6.1.5-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash  
#swishmutt
#MH 2002 <mhummel@debian.org>; starting point was: http://www.muttfr.org/gen.php3/2001/12/05/85,0,1,0.html   
#awkward example just to show the possibilities of integration of swish++ and mutt
#You certainly could create a temporary Maildir and not a mbox like here
#You need the procmail-package for the mbox formater: formail
#
#Have a look at the howto ... 
MAILHOME=~/mail
TMPRAW=$MAILHOME/sqmbox.raw
TMPMBOX=$MAILHOME/sqmbox.tmp
INDEXFILE=$MAILHOME/swish++.index
if [ -f $TMPRAW ]; then
    rm -f $TMPRAW
fi
if [ -f $TMPMBOX ]; then
    rm -f $TMPMBOX
fi
#remove old results

echo -e "Keywords with less than 4 chars get ignored by swish++ \n Your query please: \n"

read KEYWORD

if [ -z "$KEYWORD" ]; then
    echo -e "No keyword found\n"
    echo -e "Your query please !: ( type q to quit )\n"
    read KEYWORD
    if [ -z "$KEYWORD" ]; then
	echo -e "You didn't specify any keyword\n"
	echo -e "Your query please !: ( type q to quit )\n"
	read KEYWORD
    elif [ "$KEYWORD" = "q" ]; then
	exit 0
    fi  
fi

#The following assumes you created an index to $MAILHOME/swish++.index
#like:
#
#index++ -v3 -e 'mail:*' -c /PATH_TO/swish++.conf -i $MAILHOME/swish++.index ~/DIR/DIR1 ~/DIR/DIR2  ...
#if ~/DIR/DIR# is a Maildir you should give ~/DIR/DIR#/cur 
#
for i in `search++ --index-file=$INDEXFILE "$KEYWORD"  | cut -d" "  --fields=2`
  do
    
  if [ $i = "results:" -o $i = "ignored:" ]; then
    continue
#don't try to read the "results" and "ignored" indications ;-)
  fi
   cat $MAILHOME$i >> $TMPRAW 
done 
if [ ! -f $TMPRAW ]; then
    echo "No search results for the given keyword(s)"
    exit 0
#no file no result
fi
formail -ds < $TMPRAW >> $TMPMBOX
#violent approach, but can come in very handy repairing headers ...                                                     
exit  0