Re: Scripted GPG-encrypted mails
On Fri, Feb 08, 2002 at 07:24:27AM +0100, [EMAIL PROTECTED] wrote: It will at some point either require you to 1. Have an empty passphrase (not recommended) 2. Enter your passphrase (not so practical, may be?) 3. Have a script that contains the passphrase (security issue, too) 4. Have a script that takes the passphrase as CL parameter (not good) I don't think so. I'm only encrypting (not signing), so I'm just using the recipient's public key. The recipient is actually myself, at home; I want to be able to mail files from work to home and vice-versa, without disclosing company secrets... -- David Smith Tel: +44 (0)1454 462380 (direct) STMicroelectronicsFax: +44 (0)1454 617910 1000 Aztec WestTINA (ST only): (065) 2380 Almondsbury Home: 01454 616963 BRISTOLMobile: 07932 642724 BS32 4SQ Work Email: [EMAIL PROTECTED] Home Email: [EMAIL PROTECTED]
Scripted GPG-encrypted mails
Hi all. I'm trying to write a script which will mail any file specified as an argument, to a specific user. However, I need the mail to be sent GPG-encrypted. Obviously, I can use cat file | gpg -e -a -r [EMAIL PROTECTED] | mutt -s Hello World [EMAIL PROTECTED] Or equivalent, but that's a bit messy, and requires significant effort on the receiving end. Does anyone have any ideas on how I could get mutt to send a GPG-encoded file on the command line, so that it appears as a proper encrypted attachment? The MUA at the receiving end is also mutt, so there's no problem with broken receiving mailers. ...or is this beyond mutt's intended functionality? TIA... -- David Smith Tel: +44 (0)1454 462380 (direct) STMicroelectronicsFax: +44 (0)1454 617910 1000 Aztec WestTINA (ST only): (065) 2380 Almondsbury Home: 01454 616963 BRISTOLMobile: 07932 642724 BS32 4SQ Work Email: [EMAIL PROTECTED] Home Email: [EMAIL PROTECTED]
Re: Scripted GPG-encrypted mails
On Thu, Feb 07, 2002 at 02:23:49PM +, Dave Smith wrote: Hi all. I'm trying to write a script which will mail any file specified as an argument, to a specific user. However, I need the mail to be sent GPG-encrypted. Obviously, I can use cat file | gpg -e -a -r [EMAIL PROTECTED] | mutt -s Hello World [EMAIL PROTECTED] Or equivalent, but that's a bit messy, and requires significant effort on the receiving end. Does anyone have any ideas on how I could get mutt to send a GPG-encoded file on the command line, so that it appears as a proper encrypted attachment? The MUA at the receiving end is also mutt, so there's no problem with broken receiving mailers. ...or is this beyond mutt's intended functionality? TIA... Well, I'm not sure how to do this on the command line, but in a script (or possibly on the command line given enough voodoo) you could gpg-encrypt the file first, use --output to generate a gpg-crypted output file, and then call mutt with -a to attach that file to a message. Is that what you had in mind? Yeah right, like there's something you can't do with mutt. :) -- John Buttery Mulder, please explain to me the scientific significance of 'the whammy'... X-Files (Web page temporarily unavailable) msg24278/pgp0.pgp Description: PGP signature
Re: Scripted GPG-encrypted mails
On Thu, Feb 07, 2002 at 09:30:03AM -0600, [EMAIL PROTECTED] wrote: Well, I'm not sure how to do this on the command line, but in a script (or possibly on the command line given enough voodoo) you could gpg-encrypt the file first, use --output to generate a gpg-crypted output file, and then call mutt with -a to attach that file to a message. Is that what you had in mind? Well, that's closer (and less work at the receiving end), but it still doesn't come out like a 'proper' PGP/MIME mail. -- David Smith Tel: +44 (0)1454 462380 (direct) STMicroelectronicsFax: +44 (0)1454 617910 1000 Aztec WestTINA (ST only): (065) 2380 Almondsbury Home: 01454 616963 BRISTOLMobile: 07932 642724 BS32 4SQ Work Email: [EMAIL PROTECTED] Home Email: [EMAIL PROTECTED]
Re: Scripted GPG-encrypted mails
On Feb 07, Dave Smith [[EMAIL PROTECTED]] wrote: On Thu, Feb 07, 2002 at 09:30:03AM -0600, [EMAIL PROTECTED] wrote: Well, I'm not sure how to do this on the command line, but in a script (or possibly on the command line given enough voodoo) you could gpg-encrypt the file first, use --output to generate a gpg-crypted output file, and then call mutt with -a to attach that file to a message. Is that what you had in mind? Well, that's closer (and less work at the receiving end), but it still doesn't come out like a 'proper' PGP/MIME mail. Use mutt -e or -F to invoke a specific set of configs for this task that encrypt all mail sent. You may run into confirmation dialogues for the key you're encrypting to... if so, there are patches linked from www.mutt.org that can get rid of these. mutt recipient -a file_to_attach -s subject -e configs /dev/null msg24286/pgp0.pgp Description: PGP signature
Re: Scripted GPG-encrypted mails
On Thu, Feb 07, 2002 at 02:23:49PM +, Dave Smith wrote: Hi all. I'm trying to write a script which will mail any file specified as an argument, to a specific user. However, I need the mail to be sent GPG-encrypted. It will at some point either require you to 1. Have an empty passphrase (not recommended) 2. Enter your passphrase (not so practical, may be?) 3. Have a script that contains the passphrase (security issue, too) 4. Have a script that takes the passphrase as CL parameter (not good) . . /magnus -- http://x42.com/ V wbvarq RSS. Qvq lbh?
Re: Scripted GPG-encrypted mails
Le 08/02/02 à 07:24, Magnus Bodin écrivit: On Thu, Feb 07, 2002 at 02:23:49PM +, Dave Smith wrote: Hi all. I'm trying to write a script which will mail any file specified as an argument, to a specific user. However, I need the mail to be sent GPG-encrypted. It will at some point either require you to 1. Have an empty passphrase (not recommended) 2. Enter your passphrase (not so practical, may be?) 3. Have a script that contains the passphrase (security issue, too) 4. Have a script that takes the passphrase as CL parameter (not good) Probably best develop something like ssh-agent: - Have a seperate program, lets call it gpg-agent running that, on start, lets you enter the passphrase. Then, it goes into the background. - Via some ipc way; deliver the passphrase to the client program if the following conditions are met -- the client program's uid matches the one from the gpg-agent program -- the process name matches a list of known good client programs I'm pretty sure something like the above can be implemented without much effort on Unix, but I don't know the exact library functions needed. Gerhard -- mail: gerhard at bigfoot dot de registered Linux user #64239 web:http://www.cs.fhm.edu/~ifw00065/OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
Re: Scripted GPG-encrypted mails
Magnus Bodin wrote: On Thu, Feb 07, 2002 at 02:23:49PM +, Dave Smith wrote: I'm trying to write a script which will mail any file specified as an argument, to a specific user. However, I need the mail to be sent GPG-encrypted. It will at some point either require you to 1. Have an empty passphrase (not recommended) 2. Enter your passphrase (not so practical, may be?) 3. Have a script that contains the passphrase (security issue, too) 4. Have a script that takes the passphrase as CL parameter (not good) why is a passphrase required to encrypt a file TO a user? (unless they need to sign as well as encrypt). w