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

Re: PGP, Pine and scripting



On Mon, Sep 10, 2001 at 12:41:02PM -0700, Robert Threet wrote:
> I want to encrypt a file and have a script send it to
> another account.  I have PGP set up and it works well with
> Pine if I interactively add the file as an attachment (a
> MIME thing?).  If I simply type "mail rthreet@usi.edu <
> file.pgp" it gets garbled (uuencoded?) and I cannot
> decrypt.
> 
> So, "pine rthreet@usi.edu -attach file.pgp" would work
> except it drops me into the editor (which doesn't lend
> itself well to scripting).  Does anyone know if there is a
> command line param to skip this?  Or, a better answer...

Have you got mutt?  As usual with me, either mutt or php is the answer.

	echo | mutt -a file.pgp rthreet@usi.edu

will work, as mutt will not drop you into the editor if stdin is a pipe
instead of a terminal.  You'll get 2 attachments, though - the message
body (which is blank in this case) and file.pgp.

One would think that you could use the "-I" to make pine execute the
'^X,Y' sequence on startup, thus sending the message, but I can't get
it to work that way.  Maybe if you use the "-f" as well and pass the
corresponding function keys as args to -I?

--Danny
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.