how to send an encrypted and signed message from the command line most efficiently without using keyrings

Ralf Hauser
Mon Jul 14 18:54:01 2003

Hi, gives some hints,
but not all I envision

What would be the correct syntax?

gpg -s signer.asc -e receiver.gpg  message.txt --batch | mail bob@domain.tld

I manage the keys in a database outside gpg's keyrings. What is the best
format to hand them over to the gpg executable armoured or binary?
"--default-key" doesn't really get the key from a file and
with --no-default-keyring, how can just specify single keys?

Many thanks for any hints in advance!


P.S.: It would be great to add this to the FAQ and the gpg man-page examples
much like the
<<openssl smime -sign -in message.txt -text -signer mycert.pem | openssl
smime -encrypt -from me@domain.tld -to bob@domain.tld -subject "Signed and
encrypted message" -des3 bob.pem | /usr/sbin/sendmail bob@domain.tld>> as