5

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?

closed as off-topic by Pilot6, Fabby, muru, 2707974, Byte Commander Sep 23 '15 at 14:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Pilot6, Fabby, muru, 2707974, Byte Commander
If this question can be reworded to fit the rules in the help center, please edit the question.

  • We're sorry, but this site is all about Ubuntu and its official derivatives as posted on wiki.ubuntu.com/Releases so Kodi is off-topic here as well. However, on Unix & Linux, 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
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.