On Mon, Dec 02, 2019 at 09:59:59PM -0500, Timmy Xiao wrote:

> I am having trouble with syncing mail automatically when I login. I
> currently have a systemd timer that syncs mail every 5 minutes. However,
> it doesn't sync due to me having to enter a passcode when I use my gpg key
> due to PassCmd. I have gpg-agent running, so it caches my passcode when
> I enter it somewhere, but it only saves my passcode until I use a gpg service
> somewhere else and then I enter my passcode. After entering my passcode, it 
> starts
> syncing mail automatically but it's a really awkward way to do this,
> since I have to use an external service completely unrelated and then it 
> starts working.
> 
> Does anyone have a solution to this problem? Is there a way for me to
> enter my gpg passcode somewhere when I login, or plug in a smartcard 
> (I am using a yubikey)? Or is there something wrong on my end?

isync implements "PassCmd" option which can be used instead of "Pass" -
to run a command which obtains the required password using any means it
wants and then prints a line with it on its stdout.

I'm using isync on a Debian system, with GNOME desktop, and I'm using
the /usr/bin/secret-tool binary (which is a part of the libsecret-tools
package - as of Debian 10 "Buster").

This command-line tool is able to store whatever secret you tell it into
the GNOME keyring, and then fetch it back; the keyring has to be
unlocked - in order for these operations to succeed, - and it gets
unlocked when I log in (I also used this same approach under LDM/i3; in
this setup, the keyring explicitly asks for the password the first time
secret-tool wants to fetch a secret.

The secret-tool utility is able to maintain any number of keys in the
GNOME keying - each is identified by a pair of strings.

Basically I'm using something like:

  IMAPAccount domain_name
      PassCmd "/usr/bin/secret-tool lookup domain_name user_name"



_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to