Re: sending short emails
On 4/30/25 15:24, Eben King wrote:
On 4/30/25 13:36, john doe wrote:
On 4/30/25 17:35, Eben King wrote:
I wrote a script around "ssmtp" which allowed me to fire off emails
to myself from cron. Short things, like "empty the litterbox" or
whatever, just a few words. Well, ssmtp is unmaintained and I can't
get it to work reliably with my email server (which is not gmail).
What can I use to replace it, or should I just find a way to get a
real MUA to send a message for me?
I'd say msmtp.
Yeah, I'm going to modify my wrapper script to use that instead of ssmtp.
OK, I got msmtp (mostly) configured so I can do this successfully:
echo 'From: eben@gmx.us
To: eben@gmx.us
Subject: test 14:46
Test body goes here' | msmtp --tls-certcheck=off eben@gmx.us
~/.msmtprc is
,-
| defaults
| port 587
| tls on
| tls_starttls on
|
| account gmx
| host smtp.gmx.com
| from eben@gmx.us
| auth on
| user eben@gmx.us
| password xxxxx
|
| account default : gmx
|
| tls_trust_file /etc/ssl/certs/ca-certificates.crt
| logfile ~/.msmtp.log
'-
But, if I don't have "--tls-certcheck=off" msmtp gives me
msmtp: TLS certificate verification failed: The certificate is NOT
trusted. The name in the certificate does not match the expected.
msmtp: could not send mail (account default from /home/eben/.msmtprc)
From reading around I gather I need to get the certificate and put it
(with the .crt extension) in /usr/local/share/ca-certificates .
Correct? Is that the correct fix, and where would I get it?
Reply to: