This is not a duplicate, I'm aware of the other question and it didn't help me.
Here's my ssmtp.conf:
root=info@mydomain.com
rewriteDomain=mydomain.com
hostname=myHostnameHere
FromLineOverride=YES
AuthUser=info@mydomain.com
AuthPass=myPasswordHere
AuthMethod=LOGIN
FromLineOverride=YES
mailhub=mail.mymailhost.com:465
UseSTARTTLS=YES
UseTLS=YES
TLS_CA_Dir=/usr/share/ca-certificates/mozilla/
I also tried telnet-ing to the server, and it worked, so the port and the host are correct (here it is redacted).
The problem is:
sSMTP[{PID}]: STARTTLS not working
sSMTP[{PID}]: Cannot open mail.mymailhost.com:465
Executed command: echo "This is a test" | mail -s "Test" mygmail@gmail.com
Response: mail: cannot send message: Process exited with a non-zero status
OS: debian
Best Answer
Either
TLS
and / orStartTLS
in yourssmtp
configor
TLS
and / orStartTLS
onmail.mymailhost.com
.