3

There is a certificate error:

# echo "hello" | msmtp -a default [email protected]
msmtp: TLS certificate verification failed: unable to get local issuer certificate
msmtp: could not send mail (account default from /root/.msmtprc)
#

In the config file:

# cat .msmtprc
# Set default values for all following accounts.
defaults
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log

# Gmail
account         gmail
host            smtp.gmail.com
port            587
from            [email protected]
user            FOOBAR
password        BARFOO

# Set a default account
account default : gmail
#

But I have the cert there!

# uname -mrs
OpenBSD 6.0 amd64
#
# cksum /etc/ssl/cert.pem /etc/ssl/certs/ca-certificates.crt
1384454833 189049 /etc/ssl/cert.pem
1384454833 189049 /etc/ssl/certs/ca-certificates.crt
#

The log only says:

# cat .msmtp.log
Aug 22 20:43:14 host=smtp.gmail.com tls=on auth=on user=FOOBAR [email protected] [email protected] errormsg='TLS certificate verification failed: unable to get local issuer certificate' exitcode=EX_UNAVAILABLE
#

Why couldn't it recognize the cert?

Peter
  • 521
  • 10
  • 21

1 Answers1

1

Remove the file /etc/ssl/certs/ca-certificates.crt and change tls_trust_file to /etc/ssl/cert.pem.

Rufo El Magufo
  • 3,186
  • 2
  • 22
  • 35