gabriel rosenkoetter on Tue, 8 Jul 2003 01:08:15 -0400


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

Re: [PLUG] encrypted and signed bulk mail ;-)


On Mon, Jul 07, 2003 at 11:38:42PM -0400, Jeff Abrahamson wrote:
> This works when I read it in mutt, but not flawlessly: I have to pipe
> the message through gpg for this to work. I have no idea what will
> happen in other mailers.

... because it's not a PGP/MIME message and, since mutt doesn't
randomly parse message content (to make it somewhat less susceptible
to email viruses and such), you have to explicitly tell mutt to
process it. You can save yourself the ugliness of a pipe (and then
reading the message just in a mailer) and get the usual mutt PGP
output by typing "escape-shift-P" on the message (either while
viewing it or in the index). I'm not sure which version of mutt
added that functionality (I'm using 1.4), but it's the
check-traditional-pgp function.

If you *really* want this to happen automatically (I maintain that's
a bad idea!), then you can do this:

message-hook '!(~g|~G) ~b"BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' 'exec check-traditional-pgp'

(That's untested. I grabbed it from some web page, and dumped it,
commented, in my .muttrc, mostly as reference. You should probably
at least add /^---.../ to the pattern match.)

> Is there a better way?

All that comes to my mind, because mutt doesn't expose its
PGP-related fuctions on the command line, is to use Expect
(available as a Perl module from CPAN in addition to as its own
scripting language) to deal with an interactive mutt from a (fake)
pseudo-terminal.

Oh, well, further research shows that there's a PGP::Mail Perl
package available as well. You might try using that (I haven't
looked at its documentation, so I don't know if you'd need to use it
in conjunction with something like Net::SMTP) to produce PGP/MIME
messages. (Actually, I don't know that it produces PGP/MIME. But
that'd be the Right Thing to Do on its part. :^>)

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpUoJnaFYTFI.pgp
Description: PGP signature