Skip to content

Instantly share code, notes, and snippets.

Last active March 30, 2021 07:54
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Simple Mutt config for using GnuPG via GPGME
# Old-school GPG config was taken from the following docs. I'm preserving these
# links here just in case I need to configure an old version of mutt & gnupg in
# the future without gpgme.
# * /usr/share/docs/mutt/gpg.rc
# *
# *
# Mutt now has solid support for GPGME, which not only makes config much
# simpler and eliminates the need to fork gpg processes & parse their output -
# it also makes working with gpg-agent, kwallet, gnome-keyring etc. a doddle
# (i.e. automatic)
# This does of course all assume that gnupg is configured correctly, so check
# ~/.gnupg/gpg.conf and make sure commands like `gpg --list-secret-keys` and
# `gpg --search-keys 0xBE0E47FC` work as expected.
# Mutt needs to be built with gpgme support for this to work:
# mutt -v | grep -i gpgme
set crypt_use_gpgme=yes
# Automatically sign all outgoing messages
set crypt_autosign=yes
# Automatically verify the sig of a message when opened
set crypt_verify_sig=yes
# Automatically sign replies to messages which are signed
# Automatically encrypt replies to messages which are encrypted
# Automatically sign replies to messages which are encrypted
set crypt_replysign=yes
set crypt_replyencrypt=yes
set crypt_replysignencrypted=yes
# This enables the new PKA method of key validation via DNS. It's currently
# very rare, but doesn't hurt to enable & test it. See the following links for
# more details:
# (German PDF)
set crypt_use_pka=yes
# Add OpenPGP header
# See:
my_hdr OpenPGP: url=http://domain.tld/pubkey.asc; id=12345678
Copy link

Found this helpful after the v2.1 GPG upgrade that broke my non-gpgme mutt config. Have a quarter on me @changetip. Also, For your public URL, you might want to checkout for your public key hosting, examples:

Copy link

@hjst Have a quarter @changetip

Copy link

ChangeTip bot appears br0ke... sigh.

Copy link

hjst commented Feb 15, 2015

@kylemanna Glad you found it useful!

I have my public key on my own server more for historical reasons than anything else at this point, and yes I am aware of keybase: :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment