nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] PGP support


From: Oliver Kiddle
Subject: Re: [Nmh-workers] PGP support
Date: Sun, 09 Nov 2014 17:10:22 +0100

David Levine wrote:
> included with later MH distributions:
> 
> The scripts are in docs/historical/mh-6.8.5/support/general/
> of the nmh git repo.  Is anyone interested in improving/
> updating them?

In the past, I used Neil Rickert's scripts which are at
http://faculty.cs.niu.edu/~rickert/mh/
They worked fine for simple text e-mails (i.e. no attachments) and are
probably newer that the mh 6.8.5 things.

I've got a rather more rudimentary script for checking signatures which
I have attached. I think it broke with nmh 1.6, it used:
mhshow-show-multipart/signed: sigcheck %a %F
I think the breakage relates to defining that for the multipart/signed
part rather than for application/pgp-signature. Ideally we'd want to be
able to do something like
mhshow-show-application/pgp-signature: gpg --verify %F %r
where %r is the related content suitably converted to have DOS line
endings (yuk). I think there's an RFC covering multipart/signed.

Oliver

#!/bin/zsh
cat $2
umask 077
file="$(mhpath cur)"
sep="$(echo $1|sed -e 's/.*boundary="\([^"]*\)".*/\1/' -e 's/[()+\/]/\\&/g')"
nawk '{
  if ($0 ~ /^--'$sep'/) {
    stage++
  } else if (stage==1) {
    print $0 "\x0d"
  } }' < $file | sed '$ d' > /tmp/msg.$$
echo -n $'\n\e[34m'
awk '{
  if ($0 ~ /^--'$sep'/) {
    stage++
  } else if (stage==2) {
    print
  } }' < $file | gpg --verify - /tmp/msg.$$ 2>&1
rm /tmp/msg.$$
echo $'\n\e[30m'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]