nmh-workers
[Top] [All Lists]

Integrating PGP with nmh / piping in a format file

1998-02-05 20:00:06

Howdy.  I'm currently trying to figure out the best way to integrate PGP
with nmh.  I want it to work at the good old commandline -- I don't want to
use any nmh "shells" like exmh or the various Emacs modes.

Showing messages is no problem, as you can use mhl to show the header
separately, and then pipe just the body into pgpv, as in:

    #!/bin/sh
    show $* -showproc mhl -form mhl.headers
    show $* -showproc mhl -form mhl.body | pgpv -f

I haven't tackled composing PGP-encrypted messages yet, but I have definite
thoughts on how to get that to work.

Replying to an encrypted message is a little trickier, because there isn't a 
good way to separate the header from the body.  You can't call repl twice on 
the same message like you can with show.

It's too bad the format files don't give you a way to pipe parts of the
message through random external programs.  It'd be nice to be able to say
something like:

    ; mhl.reply-pgp
    ;
    from:nocomponent,formatfield="%{text} writes:"
    body:component="> ",overflowtext="> ",overflowoffset=0,pipe="pgpv -f"

The way it stands right now, I guess you have to tell repl not to reproduce
the body, and then call show -form mhl.body (hoping the current message
didn't change in the meantime), pipe that into pgpv, append that to the
draft, then somehow add the "> "s, then edit the draft.

I would have thought MH/nmh and PGP would appeal to the same kinds of folks
and would be working hand-in-hand by this time, without resorting to MH/nmh
shells.  Is there an easier way to do this that I'm missing?

 --------------------------------------
| Dan Harkless           |             |
| dan_nmh(_at_)unitech(_dot_)com    | MH FOREVER! |
| Unitech Research, Inc. |             |
 --------------------------------------


<Prev in Thread] Current Thread [Next in Thread>