October 5, 2024

Set up and start using GPG with Mutt: sign & encrypt messages

These below were initially notes to myself which I edited as this post.

The aim is to set up GPG with Mutt.

Below, I write about the step I took and the resources I used.

How do I use mutt with PGP, PGP5, or GnupG?”

All the information you need to set up and start using GPG with Mutt is already on your machine: that is the file gpg.rc. I found this information on Mutt’s website.

If you simply need the ready-to-use configuration, look for the file gpg.rc on your system and copy it in Mutt’s configuration directory; that is what did. I found the file there: /etc/Muttrc.d/gpg.rc.

And then did something like this to copy the file to Mutt’s configuration folder:

$ cp /etc/Muttrc.d/gpg.rc ~/.config/mutt/

With that, you should be able to start using GPG with Mutt. To try that this has work, go to the email pager (the screen to prepare an email you want to send) and press the key p.
Look at the bottom of the screen, in the command line, you should see options to encrypt, sign your email. I got this informatin from the webpage: http://www.mutt.org/doc/PGP-Notes.txt. Note you can attach your public key by pressing the keys Esc and K (simultaneously) and entering the UID (name or email) of your GPG keypair.

I’ve also used the resources below to learn about GPG and Mutt:

GnuPG’s manual

I don’t exactly remember which part I read first. You could start with Chapter 2. Concepts1 which discuss symmetric cipher and about public-key ciphers2. You will use public-key ciphers (with Mutt) but you might want to read about symmetric cipher first to understand why public-key ciphers are matter. If you don’t have GPG keypair yet, you might want to look at Chapter 1. Getting Started and its section on Generating a new keypair3.

J. Miller’s guide

I’ve also used the guide of J. Miller which cover the basics on how to use GPG concurrently with Mutt. Miller provides configuration specs along with directives to add to your .muttrc file in section XIV of his document. Reading the whole document Miller published helped me put together ideas I had about GPG in the context of a usage with Mutt. That was useful.

mutt.postle.net

I also read the section Mutt and GPG of http://mutt.postle.net/cryptography/index.html which guided me to Miller’s guide. In addition, I read http://mutt.postle.net/cryptography/index.html which also guided me to Miller’s guide and to http://www.mutt.org/doc/PGP-Notes.txt - which I start with at the beginning of this post.


  1. https://www.gnupg.org/gph/en/manual/c173.html↩︎

  2. https://www.gnupg.org/gph/en/manual/x195.html↩︎

  3. https://www.gnupg.org/gph/en/manual/c14.html↩︎


personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki mutt

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2024 by yctct is licensed under CC BY-ND 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88