Emacs: Crypto: How to get automatic encryption?
Gregor Zattler
Gregor at shi
Tue Jan 3 16:08:33 PST 2012
Hi Jamie, notmuch developers,
On Tue, 03 Jan 2012 13:45:14 -0800, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
> On Tue, 3 Jan 2012 20:56:51 +0100, Gregor Zattler <telegraph at gmx.net> wrote:
> > I replied to a PGP/MIME signed and encrypted e-mail and was
> > astonished to realise that my reply was sent unencrypted (and
> > unsigened for that matter).
>
> Yikes! Sorry this happened, and I hope nothing too sensitive was
> exposed.
No :-)
> Auto signing of outgoing mail can be enabled by the following [0]:
>
> (add-hook 'message-setup-hook mml-secure-message-sign-pgpmime)
>
> You can configure the message-setup-hook with the customization UI as
> well.
I tried this and enabled mml-secure-message-encrypt-pgpmime too.
I did a test with an address I have no public key for. I was
informed of the fact and asked if I want to skip this key. The
result was an email encrypted only to me (I suppose it's a
sensible default to include the key of the sender in the list of
key to encrypt to), so it would be unreadable for the recipient :-(
> Unfortunately, auto encrypting of replies to encrypted emails is not yet
> implemented. It is desperately needed, though, obviously. So this is a
> good excuse to start a discussion about how we could achieve this.
>
> It just occurs to me that a way to do this would be to have notmuch
> reply add the appropriate mml #secure tag for encryption to the output
> reply template, maybe with something like a --emacs option. That would
> be pretty easy to implement, although it would obviously be very UI
> specific.
>
> Another possibility would be for notmuch reply to add some sort of
> header to the reply message to indicate that the original was encrypted,
> and then do something in emacs to try to read that header and add the
> appropriate mml #secure tag. That would also be easy to implement in
> the notmuch CLI, and it would be more UI agnostic, but it would require
> a lot more elisp.
>
> Or maybe we could support both?
>
> Any other suggestions?
I'm no developer; your second suggestion sounds more plausible
me since notmuch is a frontend-agnostic mail system.
> > Actually the message buffer in which I write replies has Auto
> > Encryption Mode enabled, but nothing happens.
>
> That's unfortunate. Can you explain exactly how you set this up, and
> how it didn't work?
Actually I did not set it up. I tested this again with emacs23
-q ... It has something to do with EasyPG and therefore I assume
it only works on the level of file encryption if the file
associated with the buffer ends in .pgp But that's a guess.
[...]
> It's actually usually mml that is used with message-mode to
> sign/encrypt message, not epg.
Thanks for your info. Actually I'm a mutt user and I customised
mutt to opportunistically encrypt emails if I/gpg have/has public
keys for all recipients of an email. I have no clue how to
achieve this with Emacs.
Ciao; Gregor
More information about the notmuch
mailing list