6

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
Root=username@gmail.com
Mailhub=smtp.gmail.com:587
RewriteDomain=gmail.com
AuthUser=username
AuthPass=password
FromLineOverride=Yes
UseTLS=Yes
#revalias 
root:username@gmail.com:587
username:username@gmail.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 ssmtp.confand revaliases but the error stays the same, ssmtp: Cannot open 465:465

#/var/log/syslog
Sep 22 18:11:32 HTPC sSMTP[2157]: Unable to set TLS_CA_File="/etc/ssl/certs/ca-certificates.crt"
Sep 22 18:11:36 HTPC sSMTP[2157]: Unable to connect to "587" port 587.
Sep 22 18:11:36 HTPC sSMTP[2157]: Cannot open 587:587

That second to last line in syslog confuses me. Anyone?

Zarkov
  • 121
  • 1
  • 1
  • 9
  • We're sorry, but this site is all about Ubuntu and its official derivatives as posted on https://wiki.ubuntu.com/Releases **so Kodi is off-topic here as well.** However, on [unix.se], a sister site to Ask Ubuntu, they're very good at all varieties of Linux and Unix, so you might be better off there. **;-)** – Fabby Sep 22 '15 at 21:22
  • Kodi? Who said anything about Kodi? ;) – Zarkov Sep 23 '15 at 15:58

1 Answers1

4

I believe the entries in revaliases are wrong:

root:username@gmail.com:587

should rather be

root:username@gmail.com:smtp.gmail.com:587

and accordingly for the other aliases.

Nephente
  • 5,495
  • 1
  • 17
  • 23