Mutt and GnuPG
From D3xt3r01.tk
Jump to navigationJump to search
WHY
I want to encrypt my emails ! I'll be using fedora here.
HOW
1st, we'll install gnupg and gpg-tools
yum install pgp-tools gnupg
Edit ~/.gnupg/options and add the following line
keyserver wwwkeys.pgp.net
Now you can test it by getting my key and listing it
gpg --recv-keys 0xC9C40C31 gpg --list-keys justin
Add these macros in your .muttrc
set pgp_default_version = gpg # default version to use set pgp_key_version = default # default key to use, in this case, gnupg defines it set pgp_receive_version = default # default version to decrypt will be the default set pgp_send_version=default # version defined in the first line (gpg) set pgp_gpg=/usr/bin/gpg # where to find the GnuPG binary set pgp_gpg_pubring=~/.gnupg/pubring.gpg # public key file to GnuPG set pgp_gpg_secring=~/.gnupg/secring.gpg # secret key file to GnuPG my_hdr X-PGP-Key: http://d3xt3r01.tk/~dexter/pubkey.asc macro compose \CP "Fgpg --clearsign\ny" # macro compose \CS "Fgpg --clearsign\ny^T^Uapplication/pgp; format=text; x-action=sign\n"