You are not logged in.

#1 2020-11-13 21:35:57

chribonn
Member
Registered: 2020-11-12
Posts: 2

Cannot get libsecret to work with msmtp setup under system config

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

#2 2020-11-14 02:07:10

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: Cannot get libsecret to work with msmtp setup under system config

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.


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2020-11-16 13:40:50

chribonn
Member
Registered: 2020-11-12
Posts: 2

Re: Cannot get libsecret to work with msmtp setup under system config

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

Board footer

Powered by FluxBB