Dashboard > Hausmates > Using GPG and email
Using GPG and email Log In | Sign Up   View a printable version of the current page.

Added by Trygve Laugstøl , last edited by Bob 'The Despot' McWhirter on Jul 27, 2004  (view change)
Labels: 
(None)

Generating a GPG key

Generate your key:

$ gpg --gen-key

This step might be optional but at least on debian unstable and redhat it was required. Add the MIT keyserver to your GPG configuration ~/.gnupg/gpg.conf:

keyserver pgp.mit.edu

Upload your key to MIT:

$ gpg --send-key <key id>

Configuring Mutt

Add this to your ~/.muttrc and remember to replace 67320945 with your keys id.

set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x67320945 -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x67320945 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
set pgp_autosign=yes
set pgp_sign_as=67320945
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"

Restart mutt and when you compose a mail mutt should use the key to sign the mail. When pressing 'y' to send the mail you will be prompted for the passphrase of your key. Mutt will remember the passphrase for 30 minutes or 1800 seconds. The timeout can be changed by altering pgp_timeout.

GPG Resources

Site running on a free Atlassian Confluence Open Source Project License granted to The Codehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007) - Bug/feature request - Contact Administrators