In my .mbsyncrc the line at discussion is:
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.emacs.d/.mbsyncpass.gpg"
My .authinfo file contains:
machine host.name.com login m...@email.ca port ## password “mypasswd”
my .mysyncpass
and ,authinfo are encrypted by:
gpg --output .mbsyncpass.gpg --symmetric .mbsyncpass
gpg --output ~/.authinfo.gpg --symmetric ~/.authinfo
I have nothing
in my .profile related to gpg and I do not have "epa-file-enable" in my
.spacemacs file. I have also not set up encryption in my emacs
previously.
What do you mean by “this needs to be set in every new shell, so need to go in the shell config file.”. Also, is that a typo with your “automatically encryp files with “pgp” extension”.
I will reiterate that all is working for mu4e except encryption with emacs which is a pain with expiring passwords and sending mail.(without removing encryption from .authinfo).
Does your suggestion remain unchanged with this new info?
I appreciate your suggestions, I am still, though, unable to update email and database while in Mu4e with S-u after my password expires from executing the following in terminal:
mbsync --config
~/.emacs.d/.mbsyncrc m...@email.ca
I do not
SSH in, but I placed the following into both .bashrc and .profile (in
~/):
GPG_TTY=$(tty)
export GPG_TTY
I have added the
follwing into my dotspacemacs user config:
(require
'epa-file)
(epa-file-enable)
(setq epg pinentry-mode ‘loopback)
There was no effect. My .authinfo.gpg file is:
machine
host.service.name login m...@email.ca port XX password mypassword
My .mbsyncpass.gpg
file is:
mypasswrd
My .mysyncrc file
is:
IMAPAccount
m...@email.ca
Host host.service.name
User m...@email.ca
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.emacs.d/.mbsyncpass.gpg"
Port XXX
SSLType IMAPS
SSLVersions TLSv1.2
AuthMechs *
IMAPStore
m...@email.ca-remote
Account m...@email.ca
MaildirStore
m...@email.ca-local
Path ~/maildir/mbsyncmail/
Inbox ~/maildir/mbsyncmail/INBOX
SubFolders Verbatim
Channel m...@email.ca
Far :m...@email.ca-remote:
Near :m...@email.ca-local:
Patterns "INBOX" "Drafts" "Sent"
Create Near
Sync All
Expunge None
SyncState *
Portions of my
dotspacemacs user-config that may be relevant are:
(setq
mu4e-get-mail-command "mbsync -c ~/.emacs.d/.mbsyncrc -a"
mu4e-update-interval nil)
(setq smtpmail-auth-credentials "~/.authinfo.gpg")
I am using:
(emacs) spacemacs
27.2
Mu4e – mu for emacs version 1.4.15
OS is Opensuse Tumbleweed
gpg is GnuPG 2.2.27
The error I see in Mu4e with S-u is:
gpg: problem with
the agent: No pinentry
gpg: decryption failed: no secret key
As I mentioned before, I encrypted .mbsyncpass and .authinfo with:
gpg --output
.mbsyncpass.gpg --symmetric .mbsyncpass
gpg --output ~/.authinfo.gpg --symmetric ~/.authinfo
Spacemacs has a .spacemacs.env file as well as a .spacemacs file now. Within the .spacemacs.env I notice the following which may be an issue but it appears to be some sot of default value:
GPG_TTY=not a tty
I cannot be the only newcomer with pinentry problems. Again, I ask for help.
Richard