Penguin
Note: You are viewing an old revision of this page. View the current version.

If you want to be able to read encrypted mail you have sent (in your sent-mail folder), you will have to encrypt outgoing mail for multiple keys. At one point there was apparently a mutt option called 'pgp_encryptself', but it seems to no longer exist.

If you want to encrypt your mail with your own public key as well as the recipient's public key, you can do it as follows:

you@wherever:> grep pgp_encrypt /.muttrc

If you customized pgp_encrypt_only_command or pgp_encrypt_sign_command, you just want to add to them. If not, check here:

you@wherever:> grep pgp_encrypt /etc/Muttrc

.. now, you will need your key ID, which you can find with 'gpg --list-key your@email.address'. You should see something like this:

pub 1024D/72A6205E 2003-07-20 Kevin George <kevin@... .net>
uid Kevin George <kevin@... .com>

The ID is the number after the first slash (72A6205E in this case).

You now need to edit the pgp_encrypt_only_command and pgp_encrypt_sign_command lines of your .muttrc (or add new ones, based on the /etc/Muttrc ones).

So (please do not copy this directly, you should make one based on your existing settings as they may differ from mine),

set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --charset utf-8 --batch --quiet --no-verbose --output - --encrypt --encrypt-to 72A6205E --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --charset utf-8 --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --encrypt-to 72A6205E --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"

The bold area is what you are adding. Be sure to add the "--" at the beginning of the first bold word. Dashes may not appear bold in your font.

You should be set. Restart mutt and try sending encrypted email to someone else, and try reading it in your sent-mail folder. If you get shell errors, or gpg spits errors out, be sure that the 'set' lines have no linefeeds in the middle of the line. Each set line should be all on one line. You may need to disable word wrap in your editor. For example, pico/nano wordwrap by default. You can use '-w' to disable word wrap.

The following authors of this page have not agreed to the WlugWikiLicense. As such copyright to all content on this page is retained by the original authors.
  • TomislavRenic
The following authors of this page have agreed to the WlugWikiLicense.

PHP Warning

lib/plugin/WlugLicense.php:99: Warning: Invalid argument supplied for foreach()

lib/plugin/WlugLicense.php:111: Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument

lib/plugin/WlugLicense.php:111: Notice: Undefined variable: ignore_authors