<<< Date Index >>>     <<< Thread Index >>>

Re: How to activate a given GPG key through a macro...



--- Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> schrieb:

Thank you, it is much appreciated.

> > Now, the code "set pgp --encrypt-to=0x31577172"
> occurs twice in the 
> > pgp section of my .muttrc. Within this scheme, do
> I need to include 
> > that too in the macro??
> 
> Eh? That wouldn't do anything at all in a muttrc,
> that I'm aware of, 
> and *should* cause mutt to complain. Under what
> context is that in 
> your muttrc---is it in the middle of a variable
> setting or something?

These are the two instances I was referring to, been
that way a long time and mutt has never complained:

set pgp_encrypt_only_command="pgpewrap gpg --batch
--quiet --no-verbose --output - --encrypt --textmode
--armor --always-trust --encrypt-to 0x31577172 -- -r
%r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg
--passphrase-fd 0 --batch --quiet --no-verbose
--textmode --output - --encrypt --sign %?a?-u %a?
--armor --always-trust --encrypt-to 0x31577172 -- -r
%r -- %f"

> > It makes perfect sense, thanks again for
> explaining it so clearly. 
> > Fantastic, then, so I just need to replace
> "0x31577172" at each 
> > occurrence in the .muttrc with "%?a?-u %a?"... 
> 
> Not exactly, but close. Here's an example from my
> muttrc (more or 
> less), to demonstrate how it's used. Pay close
> attention to what gets 
> replaced:
> 
> set pgp_encrypt_sign_command="pgpewrap gpg
> %?a?--encrypt-to %a? --charset utf-8 --force-mdc
> %?p?--passphrase-fd 0? --batch --quiet --no-verbose
> --textmode --output - --encrypt --sign %?a?-u %a?
> --armor --always-trust -- -r %r -- %f"
> 
> When that is actually executed (assuming I send a
> message to you, for 
> example, mutt will interpret that command to be:
> 
> pgpewrap gpg --encrypt-to 0xCA8E235E --charset utf-8
> --force-mdc 
> - --batch --quiet --no-verbose --textmode --output -
> --encrypt --sign -u 
> 0xCA8E235E --armor --always-trust -- -r 0x31577172
> -- 
> /tmp/mutt-tunican-501-8500-1097
> 
> See how that works?
> 
> But yes, then the command will always refer to the
> correct key ID's, 
> no matter what you've set that key ID to be, without
> having to reset 
> the pgp command yourself.

So you say I should set the "--encrypt-to" in those
two instances to "%a?" and the "set pgp_sign_as=" to
"%?a?-u %a?" (quoted or unquoted?)...
Please confirm and I'll go ahead with it.

With my previous setup, then, I was erroneously
encrypting/signing with my public key?!?

Here is the whole of my pgp section... Please let me
know what else I messed up and should now change...

set pgp_decode_command="gpg %?p?--passphrase-fd 0?
--no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch
--output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0
--no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch
--output - --passphrase-fd 0 --armor --detach-sign
--textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch
--output - --passphrase-fd 0 --armor --textmode
--clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch
--quiet --no-verbose --output - --encrypt --textmode
--armor --always-trust --encrypt-to 0x31577172 -- -r
%r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg
--passphrase-fd 0 --batch --quiet --no-verbose
--textmode --output - --encrypt --sign %?a?-u %a?
--armor --always-trust --encrypt-to 0x31577172 -- -r
%r -- %f"
set pgp_import_command="gpg --no-verbose --import -v
%f"
set pgp_export_command="gpg --no-verbose --export
--armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch
--fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch
--with-colons --list-keys %r" 
set pgp_list_secring_command="gpg --no-verbose --batch
--with-colons --list-secret-keys %r" 
set pgp_autosign=yes   #Always attempt to  sign
outgoing messsage
set pgp_sign_as=0x31577172
#set pgp_autoencrypt=no  #Always attempt to  PGP/MIME
encrypt outgoing message
##########################################set
pgp_encryptself=yes 
#set pgp_replysign=yes   #Sign replies to messages
which are signed
set pgp_replyencrypt=yes  #Encrypt replies to messages
which are encrypted
set pgp_replysignencrypted=yes #Sign replies to
messages which are encrypted
set pgp_verify_sig=yes
set pgp_timeout=1800  #Seconds after which a cached
passphrase expires if not used
#set pgp_strict_enc=yes  #Encode PGP/MIME signed
messages as quoted-printable
set pgp_good_sign="^gpg: Good signature from"

Thank you again very much for your kind help.

Franz




      __________________________________  
Yahoo! Clever: Sie haben Fragen? Yahoo! Nutzer antworten Ihnen. 
www.yahoo.de/clever