1 Return-Path: <dme@dme.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B8B27429E3D
\r
6 for <notmuch@notmuchmail.org>; Wed, 4 Jan 2012 00:36:53 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id K8UNJWirFwCB for <notmuch@notmuchmail.org>;
\r
16 Wed, 4 Jan 2012 00:36:53 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 0B076431FD0 for <notmuch@notmuchmail.org>; Wed, 4 Jan 2012 00:36:52 -0800
\r
22 Received: by wgbds13 with SMTP id ds13so23777535wgb.2
\r
23 for <notmuch@notmuchmail.org>; Wed, 04 Jan 2012 00:36:50 -0800 (PST)
\r
24 Received: by 10.227.5.208 with SMTP id 16mr29830384wbw.17.1325666210507;
\r
25 Wed, 04 Jan 2012 00:36:50 -0800 (PST)
\r
26 Received: from hotblack-desiato.hh.sledj.net
\r
27 (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])
\r
28 by mx.google.com with ESMTPS id ex2sm12791691wib.1.2012.01.04.00.36.48
\r
29 (version=TLSv1/SSLv3 cipher=OTHER);
\r
30 Wed, 04 Jan 2012 00:36:48 -0800 (PST)
\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)
\r
32 id B770DA053A; Wed, 4 Jan 2012 08:36:46 +0000 (GMT)
\r
33 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
34 Gregor Zattler <telegraph@gmx.net>, Notmuch Mail <notmuch@notmuchmail.org>
\r
35 Subject: Re: Emacs: Crypto: How to get automatic encryption?
\r
36 In-Reply-To: <87fwfw8npx.fsf@servo.finestructure.net>
\r
37 References: <20120103195651.GA27869@shi.workgroup>
\r
38 <87fwfw8npx.fsf@servo.finestructure.net>
\r
39 User-Agent: Notmuch/0.10.2+151~gbf1dc2b (http://notmuchmail.org)
\r
40 Emacs/24.0.92.1 (x86_64-pc-linux-gnu)
\r
41 From: David Edmondson <dme@dme.org>
\r
42 Date: Wed, 04 Jan 2012 08:36:39 +0000
\r
43 Message-ID: <cunk4576ezs.fsf@hotblack-desiato.hh.sledj.net>
\r
45 Content-Type: multipart/signed; boundary="=-=-=";
\r
46 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Wed, 04 Jan 2012 08:36:53 -0000
\r
62 Content-Type: text/plain
\r
64 On Tue, 03 Jan 2012 13:45:14 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
\r
65 > Any other suggestions?
\r
67 In the function that I add to `message-send-hook' I do the following:
\r
70 ;; If already set, don't override.
\r
71 (if (not (looking-at (regexp-quote "<#secure ")))
\r
72 ;; If we can encrypt, do so, else just sign.
\r
73 (if (and encrypt (dme:message-determine-encryption))
\r
74 (insert "<#secure method=pgpmime mode=signencrypt>\n")
\r
75 (insert "<#secure method=pgpmime mode=sign>\n"))))
\r
77 Where `dme:message-determine-encryption' is:
\r
79 (defun dme:message-determine-encryption ()
\r
80 "Return `t' if we have gpg public keys for all recipients of
\r
83 (if (not (message-news-p)) ; No encryption for news.
\r
87 (if (not (pgg-lookup-key (downcase (mail-strip-quoted-names addr))))
\r
89 (message-tokenize-header (concat
\r
90 (message-fetch-field "to")
\r
92 (message-fetch-field "cc"))))
\r
96 (I'd probably re-write that to use a cl loop now - it's very old.)
\r
99 Content-Type: application/pgp-signature
\r
101 -----BEGIN PGP SIGNATURE-----
\r
102 Version: GnuPG v1.4.11 (GNU/Linux)
\r
104 iEYEARECAAYFAk8ED5cACgkQaezQq/BJZRbpowCeIdRN9kOc1Auzu8ApXwF5H08k
\r
105 alcAniDq6DKp8v9u4mYFw+6oK5IW6R09
\r
107 -----END PGP SIGNATURE-----
\r