From 169f76f754e9e4632c165c4ef90c6d0b23bfe99d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Wei=C3=9Fl?= Date: Wed, 10 Nov 2010 13:12:17 +0100 Subject: [PATCH] use formail if available (works for multiline Message-ID headers) --- muttjump | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/muttjump b/muttjump index 0a45d1d..1f16321 100755 --- a/muttjump +++ b/muttjump @@ -46,6 +46,7 @@ MAIRIX=${MAIRIX:-mairix} MU=${MU:-mu} NMZMAIL=${NMZMAIL:-nmzmail} SCREEN=${SCREEN:-screen} +FORMAIL=${FORMAIL:-formail} function die () { echo -e >&2 "$0: $1" @@ -70,7 +71,11 @@ if ! type -p $MUTT >/dev/null ; then fi # search for Message-ID in STDIN -msgid=$(sed -n 's/^Message-ID: \(.*\)/\1/Ip' | head -n1) +if type -p $FORMAIL >/dev/null ; then + msgid=$(formail -c -z -x Message-ID | head -n1) +else + msgid=$(sed -n 's/^Message-ID: \(.*\)/\1/Ip' | head -n1) +fi if [ -z "$msgid" ] ; then die "could not find Message-ID header in standard input" fi -- 2.39.5