On Sun, Mar 22, 2015 at 10:22:13AM +0100, Gour wrote:
> PassCmd "echo ${PASSWORD:-$(gpg --no-tty -qd ~/.authinfo.gpg | sed -n
> 's,^machine imap.domainl.tld .*password \\([^ ]*\\).*,\\1,p')}"
>
that looks like a pretty standard netrc parser. see the mbsyncrc.sample
shipped with mbsync (though note the fix i just pushed, inspired by your
example).
> and I've tried with my authinfo.gpg which has entries like:
>
> machine user login [email protected] password "somepassword" port imaps
>
> and it does not work and I assume (due to rusty sed skills) that problem
> is with 'port imaps' at the end of the authinfo lines?
>
i'd put the port after the machine name, before the user name, if it's
even needed at all (it's not, as far as your sample is concerned, and
neither is the user name).
but the actual problem are probably the quotes around the password - you
need to skip them. so the subexpression would be
password \"\\([^\"]*\\)\".*
> What do you think about Pwmd?
>
there is an example for that as well.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel