LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-28-2016, 03:23 PM   #1
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 83

Rep: Reputation: 15
ssmtp: Cannot open smtp.gmail.com:587


I have researched this message on Google and tried the suggestions to no avail. Here is my setup:

ssmtp.conf:
root=bugsbunny@gmail.com
mailhub=smtp.gmail.con:587
RewriteDomain=
AuthUser=bugsbunny
AuthPass=Rabbit97
UseSTARTTLS=YES

revaliases:
root:bugsbunny@gmail.com:smtp.gmail.com:587

error message:
ssmtp: Cannot open smtp.gmail.com:587

Does anyone have ssmtp working with Centos 5? If so, do you see any problems with the above setup?

Todd
 
Old 03-29-2016, 03:19 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

I do not think the problem is with CentOS 5.

Are you sure Google allows you to connect to smtp.gmail.com on TCP port 587?
Can you launch the command below?
nmap -sT -sV -p 25,587 smtp.gmail.com
 
Old 03-29-2016, 05:15 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

From this post, maybe you may need to add in ssmtp.conf:
Code:
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
Regards
 
Old 03-29-2016, 10:12 AM   #4
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 83

Original Poster
Rep: Reputation: 15
Yes, I was able to run nmap -sT -sV -p 25,587 smtp.gmail.com

I will try adding the CERT command.

Todd
 
Old 03-29-2016, 10:33 AM   #5
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 83

Original Poster
Rep: Reputation: 15
With the line added

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

I get the following error:

ssmtp: Authorization failed (534 5.7.9 https://support.google.com/accounts/answer/185833 ml5sm44116211pab.2 - gsmtp)

*BUT* that led me to the answer: since I have 2-step verification, I needed to use an application password. My test messages are going out. Now to see if I can remember how to switch things around e.g. make sure the current mail program is shut down and put in a symbolic link.

Thank you guys for the help...greatly appreciated!!

Todd
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
smtp using 587 alphatest Linux - Software 7 12-21-2010 11:00 AM
telnet to smtp.gmail.com 587 not connecting vinaytp Linux - Newbie 5 08-30-2010 12:16 AM
[SOLVED] Sendmail segfault (ssmtp) on Gentoo Linux through Gmail. crosstalk Linux - Software 2 07-16-2010 01:29 AM
Switch SMTP port from 25 to 587 hardwired Linux - Networking 7 05-31-2004 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration