[TriLUG] MSMTP for pilot.trilu.org error

vikram sai balaji ulaganathan via TriLUG trilug at trilug.org
Sun Jan 10 14:09:51 EST 2016


i am trying to set up linux to read and send emails via command line and
its easier for me to use the trilug shell. I am trying to set up msmtp in
my vm and read / send trilug emails. I emerged msmtp, set up .msmtprc and
chmod the file. When i try the following command it fails
echo "Subject - Test" | msmtp -a default <recipientemail at gmail.com>

The error it says is TLS certificate verification failed: unable to get
local issuer certificate

My msmtprc file is as below


defaults
logfile ~/msmtp.log
account trilug
auth on
host pilot.trilug.org
from <myid>@pilot.trilug.org
#i am able to send email from the trilug shell
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
tls_cert_file /root/cert.pem
tls_key_file /root/key.pem
user <myid>@pilot.trilug.org
passwd <password - raw text>
port 587

account default:trilug

-------
For the cert.pem and key.pem i used  the command
#ran as root from /root directory and have checked that key.pem and
cert.pem is present in /root
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes
-days 365

With what little knowledge i have on security i think i have basically
created a certificate using rsa so that the server can verify and it is not
verifying because i did not create it using a trusted source / did not get
it from a trusted source.

How can i fix this and any help would be appreciated!!
Thanks
Vikram


More information about the TriLUG mailing list