New comment by Eluminae on mblaze repository https://github.com/leahneukirchen/mblaze/issues/202#issuecomment-771617509 Comment: Something like this seems enough to me ``` diff --git a/bin/mverify b/bin/mverify index 1624d49..21e7e24 100755 --- a/bin/mverify +++ b/bin/mverify @@ -11,6 +11,13 @@ fi [ "$#" -eq 0 ] && set -- . +if mshow -t "$1" | grep -q "multipart/encrypted"; then + tmp=$(mktemp -t mgpg.XXXXXX) + trap "rm -f '$tmp'" INT TERM EXIT + mshow -r "$1" | "$GPG" -d > "$tmp" + set -- "$tmp" +fi + mshow -t "$1" | DOS2UNIX='/^M$/!s/$/^M/' awk -v "msg=$1" ' { match($0, "^ *"); indent = RLENGTH } $2 == "text/plain" { plain++ } ``` edit: we should add some `-n` args to some `mshow` to avoid linking the tmp file