summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
66d1f1c)
mairix can't quote special characters (~,/=^) in search words. As a
workaround, split Message-ID in 31-character long AND-linked
substrings.
if [ -z "$msgid" ] ; then
die "could not find $search_header header in standard input"
fi
if [ -z "$msgid" ] ; then
die "could not find $search_header header in standard input"
fi
+msgid_quoted=$(quote_regexp "$msgid")
msgid_clean=$(echo "$msgid" | sed -e 's/^<//' -e 's/>$//')
# try to locate path of message using a mail search engine
case $MUTTJUMP_INDEXER in
mairix)
msgid_clean=$(echo "$msgid" | sed -e 's/^<//' -e 's/>$//')
# try to locate path of message using a mail search engine
case $MUTTJUMP_INDEXER in
mairix)
- orig_msgfiles=$($MAIRIX -r "m:$msgid_clean")
+ # mairix can't quote special characters (~,/=^) in search words. As a
+ # workaround, split Message-ID in 31-character long AND-linked
+ # substrings.
+ msgid_mairix=$(echo "$msgid_clean" | sed -e 's/[~,/=^]/=,/g' \
+ -e 's/.\{31\}/&=,/g' -e 's/^\(=,\)\+//g' -e 's/$/=/' \
+ -e 's/\(=,\|=\)\+$/=/g')
+ orig_msgfiles=$($MAIRIX -r "m:$msgid_mairix")
;;
mu)
orig_msgfiles=$($MU find -f l "i:$msgid_clean" | grep -v "^\*\*")
;;
mu)
orig_msgfiles=$($MU find -f l "i:$msgid_clean" | grep -v "^\*\*")