Differences between version 14 and predecessor to the previous major change of MuttGPGEncryptToSelf.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 14 | Last edited on Monday, April 4, 2005 9:07:15 pm | by JohnMcPherson | Revert |
Older page: | version 11 | Last edited on Friday, July 9, 2004 1:59:40 am | by TomislavRenic | Revert |
@@ -1,48 +1,29 @@
-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 with 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 be able to read encrypted mail you have sent (in your sent-mail folder), you will have to encrypt outgoing mail with multiple keys, one of them being your own
. At one point there was apparently a mutt option called <tt>
pgp_encryptself</tt>
, 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:
-
$ grep pgp_encrypt ~
/[.muttrc
]
+To do that anyway, you will first need your key ID, which you can find as follows:
+<verbatim>
+
$ gpg --list-key your@email.address
+pub 1024D
/72A6205E 2003-07-20 Kevin George <kevin@... .net>
+uid Kevin George <kevin@... .com>
+
[...
]
+</verbatim>
-If you customized __pgp_encrypt_only_command__ or __pgp_encrypt_sign_command__, you just want to add to them
.
-If not, check here:
+The ID is the number after the first slash - 72A6205E in this case
.
- $ grep pgp_encrypt
/etc
/Muttrc
+The easiest way to do things is to just add the following lines to <tt>~
/.gnupg/gpg.conf</tt>, replacing ABCD1234 with your key ID you found in the previous step:
+<pre>
+default-key ABCD1234
+encrypt-to ABCD1234
+<
/pre>
-You
will now need
your key ID
, which you can find as follows:
+Beware though, that this change
will encrypt everything to
your own
key, not just mails sent from [Mutt].
- $ gpg --list-
key your@email.address
- 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. Now edit the pgp_encrypt_only_command and pgp_encrypt_sign_command lines of
your [.muttrc] (or add new ones based on the entries in /etc/Muttrc) to look like this:
-
-(__Please do not copy these lines directly__ - base yours on your existing settings as they will likely 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 now be set. Restart [mutt|Mutt] and try sending encrypted email
to someone else, then try reading it in your sent-mail folder
.
-
-
If you get shell or [gpg|GPG] errors
, be sure that the 'set' lines have no linefeeds where they don't belong. You may need to disable word wrap
in your editor (pico/nano word wrap by default - use the '-w' command line argument to disable word wrap).
-
-If/when you upgrade [mutt|Mutt], you will probably want to check your
/etc/Muttrc afterwards and see if any of the pgp_encrypt_X lines have been modified.
-This should not be a problem though, since you should not have edited the lines in there, but in ~
/.muttrc instead. That makes much more sense as well, in case you want to add other users to the system later (or if they already exist). When they send encrypted mail, they will not appreciate it if it is readable by you ;-)
-
-----
-As an aside, you can also just add the following lines to your ~/.gnupg/gpg.conf file
-
-default-key ABCD1234
-encrypt-to ABCD1234
+If you want to encrypt only mail with your own public
key as well as the recipient's public key, you need to customize the
<tt
>pgp_encrypt
</tt
> setting
in your [.muttrc]. If you customized <tt>
pgp_encrypt_only_command<
/tt> or <tt>
pgp_encrypt_sign_command<
/tt>,
you just want
to add to them
. If not
, find them
in <tt>
/etc/Muttrc<
/tt>
.
-Replace ABCD1234 with
your key ID as described above
.
+Now edit the <tt>pgp_encrypt_only_command</tt> and <tt>pgp_encrypt_sign_command</tt> lines of
your [.muttrc] or add new ones based on the entries in <tt>/etc/Muttrc</tt>, and include an <tt>--encrypt-to ABCD1234</tt> parameter in both, where ABCD1234, again, is to be replaced by the
key ID from your key. Restart [Mutt] and try sending encrypted email to someone else, then try reading it in your sent-mail folder
.
-Beware though
, that this change will encrypt everything
to your own key,
not just mails sent from mutt
.
+After upgrades to [Mutt]
, make sure
to check
your <tt>/etc/Muttrc</tt> to see if any of the <tt>pgp_encrypt_X</tt> lines have changed. You should only edit the lines in [.muttrc] for that reason. Not making changes the central configuration also makes sense in case the system is (going to be) used by other users -- they will appreciate that their encrypted mail is
not readable to you
. ;-)
----
Part of CategoryCryptography