On Fri, Jan 29, 2016 at 03:43:18PM +0000, Darac Marjal wrote:
> I don't know if this helps, but I have the following options in my
> ~/.gnupg/gpg.conf:

Didn't know about the auto-key-locate, I thought it would fit my need.

But it seems it does not affect the `--search-keys <email>` syntax.

Since I want a mutt-specific keyring for keys fetched from mutt, I need
to set a specific gog command inside `pgp_getkeys_command`, eg:
> gpg --primary-keyring autokeys.gpg --search-keys
or
> gpg --no-default-keyring --keyring autokeys.gpg --search-keys

But the simple fact of defining it implies that local keys are ignored,
and sadly I bet `auto-key-locate local` did not change this.

*but* I found a workaround:
> set pgp_getkeys_command="gpg -k %r &>/dev/null || ~/.mutt/gpg-expect gpg 
> --primary-keyring autokeys.gpg --search-keys %r"
and this works¹

[I would have expected mutt internally does this `gpg -k %r &>/dev/null`
before calling `pgp_getkeys_command`, since it happens when
pgp_getkeys_command is undefined.



thanks for helping on this



¹ ~/.mutt/gpg-expect
just automatically add one of the results of the search to the keyring.

Attachment: signature.asc
Description: Digital signature

Reply via email to