Debian – How to autofetch public keys in mutt

debiangpgmutt

I am thinking if it is possible to autofetch public keys for new recipients from the main gpg/pgp key servers.
I was thinking about some setting in $HOME/.muttrc, studying here but did not find a conclusive setting for the target. I tried pgp_verify_sig there but my Mutt says source: errors in /home/users/leo/.muttrc, so implying me that it is not the correct parameter to autofetch public keys from the main key servers. Pseudocode

  1. define main key servers if necessary
  2. set autofetch of public keys for the senders from the key servers

Common view in my Mutt

[-- PGP output follows (current time: Wed 21 Jun 2017 10:52:06 AM EEST) --]
gpg: Signature made Wed 21 Jun 2017 10:51:18 AM EEST using RSA key ID ....
gpg: Can't check signature: public key not found
[-- End of PGP output --]

[-- The following data is signed --]

Testing SD Allen's proposal

Code in $HOME/.gnupg/gpg.conf

keyserver hkp://keys.gnupg.net
keyserver-options auto-key-retrieve
# Automatically verify the sign of a message when opened
set crypt_verify_sig=yes

Output: still same failed output PGP signature could NOT be verified in Mutt

OS: Debian 8.7

Best Answer

In order to do this, add this line to your ~/.gnupg/gpg.conf file:

keyserver <keyserver address> keyserver-options auto-key-retrieve

Related Question