add irc channel to README
[mmh] / uip / mhpgp.sh
index 4929358..1cfa274 100755 (executable)
@@ -6,7 +6,7 @@
 # mhpgp:
 #   -write:  Save the decrypted message to the current folder
 
-usage="Usage: mhpgp [-write] msg"
+usage="Usage: mhpgp [-write] [-Version] [-help] [+folder] [msg]"
 
 # prepend the default options from the profile
 set -- `mhparam -nocomp ${0##*/}` "$@"
@@ -103,6 +103,14 @@ decrypt() {
                b a' "$FILE" > "$TEMP/outfile"
 
        if [ "$1" = "plain" ] ; then echo "" >> "$TEMP/outfile" ; fi
+
+       # Replace original header fields by secure copies that some
+       # mail clients (e.g. Enigmail) store within the encrypted and
+       # signed MIME part.
+       for i in `sed -n '/^$/q; /^[    ]/d; s,:.*,,p' "$TEMP/msg"` ; do
+               anno -delete -comp "$i" "$TEMP/outfile"
+       done
+
        sed -e 's/\r$//' $TEMP/msg >> "$TEMP/outfile" || exit 1
 
        if [ "$wflag" = "1" ] ; then