[neomutt-devel] pager: how to retrieve pubkey

Sven Guckes neomutt-lists at guckes.net
Tue Nov 22 15:23:42 CET 2016

how do *you* retrieve an unknown public key?

you read a message (you are in the menu "pager")
and gpg tells you that it can not check the signature
because you do not have a copy of the public key
which was used to sign the message:

  gpg: Signature made Wed Nov 23 05:23:42 2016 CET
  gpg:              using RSA key 0123456789ABCDEF
  gpg: Can't check signature: public key not found

who to download/retrieve that public key?

here is what i do:

i basically copy the keyid and paste it into a shell:

    gpg --recv-key 0123456789ABCDEF

that's it.

it helps that my neomutt is running within gnu screen
(a window manager for the terminal) which has a "copy mode"
so i can navigate on the screen using vi commands, copy the id,
open a new window with a shell, and paste the key id there.

and i use "grecv" as an alias for "gpg --recv-key"
which, of course, saves some typing.

but even though i have cut down on keystrokes
in the process this remains a *manual* process.
and this is where neomutt is lacking a command!

i'd rather add a keybinding which automates this.
probably piping the current message to a script.

however, piping from within the pager
does not give you the full, raw message.
instead, you get the message with some parts of the
header its text part, but without the signature.

and switching into the index seems to
shift the problem into another context
which i also do not want.

where to start here?

maybe neomutt needs a new option which contains the command
to extract the keyid and retrieve the key from a keyserver?

but then this needs to be assigned to another key.

so far we have these commands associated
with key management within the pager:

  ^K      (CTRL-K)  extract-keys
  <Esc>k   (ALT-K)  mail-key

so - a command for the retrieval of
a needed key isn't there at all. :-(

there are still keys available for commands:

  menu "pager": active keybindings
   ALT: taken: /CPcdeknprsu
  ----: taken: !#$-./123456789:?@CFJKLNOPQRSTVW
         free: "%&'()*+,0<=>ABDEGHIMUXYZ[]_`lyz{}~
    sequences: <Up>   <Down> <Right> <Left>
               <Home> <Ins>  <End>  <PageDown> <PageUp>
               <F1> <F2> <F3> <F4>  <F5>  <F6>
               <F7> <F8> <F9> <F10> <F11> <F12>

by the way, this list of bindings was taken for my
latest neomutt binary without any startup files.

btw: would anyone add such an overview to the menu help?

so.. how to solve this?
(1) manual copy+paste
(2) bind to external script
(3) options -> external command
(4) add internal new command -> new code!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1473 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20161122/9d99bb69/attachment.sig>

More information about the neomutt-devel mailing list