When configuring reportbug
, I have an option to store the password for the remote smtp service in $HOME/.reportbugrc
. How can I make it use an existing password stored by GNOME Web (Epiphany) or Evolution in GNOME keyring instead, so that I do not need to update $HOME/.reportbugrc
if the password in GNOME keyring changes?
I found that I can read the password from GNOME keyring with secret-tools
command, which is provided by libsecret-tools
package, and use command substitution with $(…)
to invoke secret-tools
and use its output like this:
$ reportbug --smtppasswd=$(secret-tool lookup uri https://webmail.example.invalid)
or this:
$ reportbug --smtppasswd=$(secret-tool lookup target_origin https://webmail.example.invalid username [email protected])
Unfortunately, reportbug
does not seem to perform substitution in ~/.reportbugrc
. I tried like this:
smtppasswd "$(secret-tool lookup target_origin https://webmail.example.invalid username [email protected])"
Is there a workaround to this?