You are not logged in.
Hello,
I have msmstp setup as a system configuration. The configuration file under at /etc/msmtprc.
When the password is stored inside the config file everything works as expected.
I would like to remove the password from within /etc/msmstprc and use libsecret.
Below is my /etc/msmtprc
account default
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp
# gmail
host smtp.gmail.com
port 587
from <account>@gmail.com
user <account>
#password <password>
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL
The following was used to store (and verify) that the password is working.
secret-tool store --label=msmtp host smtp.gmail.com service smtp user <account>
secret-tool lookup host smtp.gmail.com
When I check the log for msmstp I am informed that the account / password are not correct.
What am I missing?
Thank you
Offline
Can you use code tags?
And separate what you do as user with $ and as root with #?
I think you made it as user, but system requests as root, which obviously fails.
Otherwise I just don’t get it, so give better formatting.
Offline
Thank you.
I solved it by adding in /etc/msmtprc passwordeval entry
The modified configuration file now reads as follows:
account default
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp
# gmail
host smtp.gmail.com
port 587
from <account>@gmail.com
user <account>
passwordeval "secret-tool lookup host smtp.gmail.com"
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL
Thanks
Last edited by chribonn (2020-11-16 13:52:11)
Offline