On 05/01/08 20:04, Marianne Promberger wrote:
Can mutt send encrypted mail from the commandline? The mail should
always be encrypted to myself.
I tried the following:
cp ~/.muttrc ~/muttrcenc
in ~/.muttrcenc:
-----
set pgp_autoencrypt=yes
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch
--quiet --no-verbose --output - --encrypt --textmode --armor
--always-trust -- -r 80AD9916 -- %f"
-----
where 80AD9916 is my public key ID.
Then I tried
echo "some text" | mutt -F ~/.muttrcenc [EMAIL PROTECTED]
I get the message, but it's not encrypted.
Background:
I'd like to use procmail to automatically encrypt some messages I
receive and forward them on to a gmail account for storage.
I currently do this using in ~/.procmailrc:
:0fbw
| $GPG --encrypt -r 80AD9916 --armour --output -
This works okay except it doesn't add the correct headers, and
while mutt decrypts the message text fine (with Alt-Shift-p) I cannot
see attachments (which in turn may be related to having the wrong
headers).
Why complicate simple things :-)
Why don't you use:
gpg -ea -r public_key_ID file.txt && mutt -a file.txt.asc
--
#Joseph
GPG KeyID: ED0E1FB7