Split GPG and Emacs/mu4e: able to retrieve email but not send

145 views
Skip to first unread message

rumsey....@gmail.com

unread,
Jan 27, 2018, 7:07:57 PM1/27/18
to qubes-users
Novice computer user here.

I use mu4e with mbsync in emacs for email. Login info for email is retrieved from an encrypted file. The appropriated gpg keys are present and working in the offline gpg-qube.

Using "/usr/bin/qubes-gpg-client-wrapper" in place of "gpg" as a pass command in the mbsync file for retrieving login information from the encrypted file is working properly for retrieving my email, but when I try to send an email I get an error:

Error while decrypting with "gpg2":

gpg: encrypted with RSA key, ID <not sure if I'm supposed to share this # or not>
gpg: decryption failed: No secret key

I thought that I might just need to change the epg-gpg-program variable in emacs to qubes-gpg-client or /usr/bin/qubes-gpg-client-wrapper but neither of those two changes make any difference. It only results in the same error message, but with "gpg2" being replaced by "qubes-gpg-client" or "/urs/bin/qubes-gpg-client-wrapper".

I've scoured the internet and have exhausted my ability to try to troubleshoot this with my own understanding.

I'm hoping that someone here can point out what I've missed.

rumsey....@gmail.com

unread,
Jan 28, 2018, 1:10:31 AM1/28/18
to qubes-users
Apparently creating a post for help is like replacing something you've lost, only to find it immediately after replacing it.

Here's the solution to this problem:

Apparently Emacs will trick you into thinking you've changed the epa-gpg-program variable, but it won't actually honor that change when it runs a gpg call.

This: https://blogs.fsfe.org/jens.lechtenboerger/2017/04/12/gnu-emacs-under-qubes-os/

Supposedly I should be able to use the following to make Emacs recognize qubes-gpg-client-wrapper:

(customize-set-variable 'epg-gpg-program "/usr/bin/qubes-gpg-client-wrapper")

But even though I'm running 25.3.1, it didn't work. I had to fall back to a second option:

(require 'epg-config)
(customize-set-variable 'epg-gpg-program "/usr/bin/qubes-gpg-client-wrapper")
(push (cons 'OpenPGP (epg-config--make-gpg-configuration epg-gpg-program))
epg--configurations)

This did the trick and actually got Emacs to recognize the changed variable.

I can now send email using emacs/mu4e and Qubes split gpg.

[799]

unread,
Jan 28, 2018, 1:10:36 PM1/28/18
to rumsey....@gmail.com, qubes...@googlegroups.com
Hello Rumsey,

>> I can now send email using emacs/mu4e
>> and Qubes split gpg

I am also interested in this setup. Can you give me some more information what needs to be done to start from a plain installation?
Something like a copy of the relevant configuration files (stripping out the personal configuration of course by replacing it with something like MAILSERVER.COM, LOGI...@DOMAIN.COM, YOUR-GPG-KEY-ID etc).

Would really appreciate this, to get things up and running.

[799]

rumsey....@gmail.com

unread,
Jan 28, 2018, 2:12:34 PM1/28/18
to qubes-users

Are you asking about how to get mu4e up and running in emacs? If so, that is outside the scope of this message group and I'm certainly not the best place to go for information.

I would suggest doing your googles, as there are many guides for this process available scattered about.

Briefly, I have found that I'm happy with the an email setup that uses mu4e (https://www.djcbsoftware.nl/code/mu/mu4e.html) for interacting with email in emacs. I use isync/mbsync (http://isync.sourceforge.net/) for getting my mail from the server.

Guides like this one: http://www.macs.hw.ac.uk/~rs46/posts/2014-01-13-mu4e-email-client.html

...are helpful for giving you a template on how to set everything up, and it's just a matter of wading through the details to get it tuned to your own liking.

Reply all
Reply to author
Forward
0 new messages