I use pgp-hook to define a key for an email address:

pgp-hook [EMAIL PROTECTED] ABCD1234

     I also tell mutt to always encrypt to this address:

send-hook . set pgp_autoencrypt=no
send-hook [EMAIL PROTECTED] set pgp_autoencrypt=yes

     When I send a message to this email address, mutt indeed knows to
encrypt this message by default, and to sign it with my key (I have my
pgp_sign_as set):

     PGP: Sign, Encrypt
 sign as: D68F2C07                      MIC algorithm: pgp-sha1

     When I hit 'y' to send the message, I get a prompt in the bottom line:

Use keyID = "ABCD1234" for [EMAIL PROTECTED]? ([y]/n): 

     OK... so mutt is idiot-proofing.  No problem there.  However, when I
hit y, I get:

q:Exit  <Return>:Select  c:Check key  ?:Help                                    
->    1 +  1024DSA /87654321 -s Some Body <[EMAIL PROTECTED]>
      2 +  4096ElG /ABCD1234 e- Some Body <[EMAIL PROTECTED]>

...

-- Mutt: PGP keys matching <[EMAIL PROTECTED]>.                                


     Even though I have specified what key to use, and confirmed it at
the prompt mutt gives me, it still does a search on the keyring for a
key matching the email address.  I then have to move my pointer to option
2 (the encryption key) and hit return.  Then I get:

gpg: using secondary key ABCD1234 instead of primary key 87654321
gpg: No trust check due to --always-trust option
gpg: No trust check due to --always-trust option
gpg: writing to `-'
gpg: ELG-E/TWOFISH encrypted for: ABCD1234 Some Body <[EMAIL PROTECTED]>
gpg: DSA signature from: D68F2C07 Jack McKinney (VP Programming) <[EMAIL PROTECTED]>


     It is just as though I had never put the pgp-hook in there...

     In summary, mutt uses the appropriate key to sign based on the
pgp_sign_as variable, but it pretends to use the pgp-hook, but then
makes me choose the key anyway.  Then, even though I choose the
encryption key, it appears to try and use the primary/signing key,
causing GPG to choose the encryption key.
     JIC, I moved my send-hooks ahead of the pgp-hooks in .muttrc,
but it made no difference.
     Is this a known bug?  I haven't taken the time to look through the
source code, yet.

     Also... once you are in the key selection process, there is no turning
back without exiting mutt altogether and thus losing the message you were
working on.

--
"Restore your inalienable human rights.       Jack McKinney
 Vote Libertarian.  http://www.lp.org         http://www.lorentz.com
 http://www.harrybrowne2000.org               [EMAIL PROTECTED]
                                              1024D/D68F2C07 4096g/38AEF076

PGP signature

Reply via email to