[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[msmtp-users] passwordeval & multiple accounts



Hello!

After switching to mu4e mailier I'm using msmtp to send all my mail and would
like to take advantage of passwordeval's feature...

Considering that when I use mbsync for syncing my local Maildir folders with
the remote IMAP servers, I use the following config to extract my password
from encrypted ~/.authinfo.gpg file.

PassCmd "echo ${PASSWORD:-$(gpg --no-tty -qd ~/.authinfo.gpg | \
sed -n 's,^machine gour .*password \"\\([^\"]*\\)\".*,\\1,p')}"

I'd like to do the same with msmtprc, iow. use the samee ~/.authinfo.gpg file
and extract required password for each account instead of storing only one
password per account in encrypted gpg files.

I have tried with:

passwordeval gpg2 --no-tty -qd ~/.authinfo.gpg | \
sed -n 's,^machine gour .*password \"\\([^\"]*\\)\".*,\\1,p'

but Emacs reports:

msmtp: cannot read output of 'gpg2 --no-tty -qd ~/.authinfo.gpg | sed -n
's,^machine gour .*password \"\\([^\"]*\\)\".*,\\1,p''

Any clue what might be wrong?

Of course, using single password per account works, but I wonder what's wrong
considering thar running the above command in the terminal gives password as
output?


Sincerely,
Gour

-- 
Therefore, without being attached to the fruits of activities, 
one should act as a matter of duty, for by working without 
attachment one attains the Supreme.