I'm trying to configure my HTPC to send me an email once in a while, particularly after certain cron jobs but I can't get it to work. I've also got a server running Ubuntu 14.04 LTS where I eventually got SSMTP to work so I've tried to copy those settings (ssmtp.conf) but to no avail. When trying to send an email from CLI, I get an error message saying
ssmtp: Cannot open 587:587
#ssmtp.conf hostname=HTPC Rootemail@example.com Mailhub=smtp.gmail.com:587 RewriteDomain=gmail.com AuthUser=username AuthPass=password FromLineOverride=Yes UseTLS=Yes
#revalias root:firstname.lastname@example.org:587 username:email@example.com:587
I've googled a fair bit and found a bugreport regarding SSMTP and Gmail where the certificates were to blame, the suggestion was to add
TLS_CA_File=/etc/ssl/certs/ca-certificates.crt to my
ssmtp.conf file. I've tried that but when checking the directory, there is no
ca-certificates.crtfile there and the error message is the same.
I also tried using port 465 instead, replacing 587 in bort
revaliases but the error stays the same,
ssmtp: Cannot open 465:465
#/var/log/syslog Sep 22 18:11:32 HTPC sSMTP: Unable to set TLS_CA_File="/etc/ssl/certs/ca-certificates.crt" Sep 22 18:11:36 HTPC sSMTP: Unable to connect to "587" port 587. Sep 22 18:11:36 HTPC sSMTP: Cannot open 587:587
That second to last line in
syslog confuses me. Anyone?