Page 1 of 1

PGP mail - is there a code command ?

Posted: Fri Jul 27, 2007 1:12 pm
by jramaro
Hi ,
I have PGP mail on Host/server. Already set-up and public and private keys generated.

I'm re-doing this part of a website that was formerly done by someone else.
They used a lot of their own script mail forms that are not functional now and those that were left are 'bugged'
example: = sending encrypt mails to themselves. (had to delete their PGP keys as well)
their scripts looked wacked and bugged like they were James Bond freaks.

Starting fresh with PGP script. already have custom php mail form created.
Is there a command i can put into the = mail($to etc.?
to tell it user/cgi-bin etc.
or will i have to rebuild the handling of the keys ?


looked through PHP manual - and found excessive GnuPG info that didnt relate as far as i know.
Thanks

Posted: Fri Jul 27, 2007 2:30 pm
by Ambush Commander
You probably will want to reconfigure which sendmail binary is being used, which is what I assume PGP Mail is using to intercept your emails and encrypt them. There relevant ini directive is sendmail_path.

If no such facility exists, you will need to manually call the pgp/gpg binaries to encrypt the data before passing it to $data.

Posted: Mon Jul 30, 2007 10:25 am
by jramaro
Ok, but what i mean is can i have something in the mail form send?

so if my original line to send the mail in regular format is:

Code: Select all

$ok = mail($to, $subject, $message, $headers);
Then is there a way to include something as say:

Code: Select all

$ok . = mailto:pgp-public-keys@mydomain.com/userbin/pgp
or something like that? Since the mail is already created and its only a matter of redirecting it to the pgp encryption which is already
set up on the host . it seems al lthe rest should be taken care of within the pgp program on the Host?

Thank you

Posted: Mon Jul 30, 2007 10:33 am
by Chris Corbyn
No, you'll have to handle it at a lower level if you want to use mail().

If you know the sendmail arguments that are needed you can pass them as the 5th parameter in mail().

Posted: Mon Jul 30, 2007 1:13 pm
by jramaro
d11wtq or Ambush commander,
do you have a website offhand that would show this?

= newbie in PGP.

I wont be doing PGP full time so im wondering if theres a simple functionality or does it require
that you get into the grease and bolts at the bottom of it ?

because i was hoping that there would be possible a few standard requisite lines like

1. a call to send the mail pgp , where = the userbin/pgp
2. if its open ok , encrypt mail ..else say cannot send.
3. Send mail to recipient

does pgp simplify their program like that?
writing a heck of a lot of code to encrypt a message seems pretty crazy.

Thanks for help