Page 1 of 1

SSMTP

Posted: October 19th, 2016, 3:39 am
by dalewis62
I have been using SSMTP to send emails though Gmail for years an then suddenly with no other change stopped getting messages a couple weeks ago. I am getting the error "cannot open socket". I have re-confirmed my configuration against Ian's tutorial till my eyes are crossed. Has anyone else experienced this and found the solution?

Re: SSMTP

Posted: October 19th, 2016, 7:36 am
by fluttershy
Apparrently people are saying to add this line to smtp.conf but its not working for me.

"TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt "

Re: SSMTP

Posted: October 20th, 2016, 4:44 am
by dalewis62
Thanks for the reply fluttershy. Appears I am in same spot as you where adding the certificate line has not changed problem.

Re: SSMTP

Posted: October 21st, 2016, 12:34 am
by fluttershy
hey. update. try putting no instead of yes for both of the tls lines and tell me what the output of a test email says

Re: SSMTP

Posted: October 21st, 2016, 12:56 am
by fluttershy
i got it working. updated am linking you my conf that works


Code: Select all

# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=kaibsora@gmail.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.comu



mailhub=smtp.gmail.com:587

AuthUser=kaibsora@gmail.com
Authpass=
#UseSSL=YES
UseTLS=Yes
UseStartTls=Yes
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
# Where will the mail seem to come from?
rewriteDomain=gmail.com
hostname=localhost
FromLineOverride=YES

Re: SSMTP

Posted: October 21st, 2016, 12:57 am
by fluttershy
It seems as the hostname needed to be changed.

Re: SSMTP

Posted: October 21st, 2016, 11:02 pm
by dalewis62
Thank for the feedback fluttershy. I will try some of your thoughts when I get home this evening.

Have question about the certificate. On my machine the director path does not exist and I do not have a file ca-bundle.crt. How did you get the certificate and did you have to create the directory path? I currently have mine pointed to ca-certificate.crt which is found in the director /usr/lib/ssl/certs.

Re: SSMTP

Posted: October 22nd, 2016, 4:26 am
by dalewis62
I finally got it working and without the certificate. Ended up having to change the hostname and then reboot did trick.