Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

managing multiple gpg key with mutt

238 views
Skip to first unread message

julien

unread,
Sep 4, 2009, 5:54:39 PM9/4/09
to
Hello

i'm trying to use mutt 1.5 with gpg and multiple keys.
i added to my muttrc the gpg.rc file

i know i need to define pgp_sign_as for default key but what i want is
* a default key when signing
* a way to define a list of recipients for which i use a key, some
others a second key, others none, ...
* a way to choose key in live in mutt after composing. for now, calling
'p' and searching for a key seems to return nothing (alias 'a')

is it possible ? how ?

thanks a lot
Best regards,

Julien

Will Yardley

unread,
Sep 4, 2009, 8:47:36 PM9/4/09
to
On 2009-09-04, julien <julien.t...@NOSPAMgmail.com> wrote:

> i know i need to define pgp_sign_as for default key but what i want is
> * a default key when signing
> * a way to define a list of recipients for which i use a key, some
> others a second key, others none, ...

Have you looked at crypt-hook in the muttrc(5) man page?

send-hook might also be useful for certain stuff.

--
Multi-lingual forum for Chinese and Japanese tea and teaware:
http://teadrunk.org/

julien

unread,
Sep 5, 2009, 4:26:06 AM9/5/09
to
Will Yardley wrote on 5/09/09 2:47:

> On 2009-09-04, julien <julien.t...@NOSPAMgmail.com> wrote:
>
>> i know i need to define pgp_sign_as for default key but what i want is
>> * a default key when signing
>> * a way to define a list of recipients for which i use a key, some
>> others a second key, others none, ...
>
> Have you looked at crypt-hook in the muttrc(5) man page?
>
> send-hook might also be useful for certain stuff.
>

thanks for the feedback Will.

i tried it but it doesn't do all i want but i'm not sure how hook
applies, mainly for a new mail (after writing mail at preview or just
when sending for example)
is there a way to confirm hooks which applied to a composed email ? and
when ?

Also after composing, in preview, i see
From: xxx
To: xxx
Cc:
Bcc:
Subject: xxx
Reply-To:
Fcc: =sent-mail
PGP: Sign (PGP/MIME)
sign as: <default>

And i never know which key is default. it would be great to be able to
check it here and display id/email used.
any hints how to do this ?

thanks
Best regards

Will Yardley

unread,
Sep 8, 2009, 1:59:13 AM9/8/09
to
On 2009-09-05, julien <julien.t...@NOSPAMgmail.com> wrote:

> i tried it but it doesn't do all i want but i'm not sure how hook
> applies, mainly for a new mail (after writing mail at preview or just
> when sending for example)

What is the exact pgp hook you have in your .muttrc, and what exactly
are you trying to do?

> sign as: <default>
>
> And i never know which key is default. it would be great to be able to
> check it here and display id/email used.
> any hints how to do this ?

Well I am not an expert, but it looks like you can select (p)gp-menu (p
is the default binding), and 'a' (sign-(a)s) to change the key you're
sending as. From a quick test, it looks like if the email address you're
sending as doesn't match one of the identities, it will show the key-id
next to "sign as" in the compose menu (I'm guessing it may also do this
if more than one key has an identity matching that email address).

I *think* when you've correctly gotten mutt to choose a different key to
encrypt with, you will see the corresponding key-id there in the menu,
but I am not 100% sure of that.

Typing ":set ? pgp_sign_as" should tell you what key-id is the default,
at least for a given context.
http://wiki.mutt.org/?MuttGuide/UseGPG

w

B.H.

unread,
Mar 16, 2016, 5:45:18 PM3/16/16
to

Will, if you are still around, please reply and I can help you sort these
things out.
What Julien says is correct it appears, but you can go a bit farther making
macros.
I use two pgp keys. One is default, but I have macros that I can use to
choose the 2nd key or switch back to the default one.
I also use hooks to auto encrypt to a couple of people, and to not use my
default digital sig to some others, e.g. mailing lists and folks who are using
those foolish microsoft email clients that can't even handle a digital sig
with out an extension.
I always see the key being used in the compose menu before I send, although I
think I did only see default in some context a long time ago.
I reccomend using gpgme instead of the cumbersome old school gpg syntax.
I know this conversation is kind of ancient, but I've just started looking at
this group, and hardly used usenet for 2 or more years untiol a few weeks
ago/just reading your question for the first time.
B.H.
0 new messages