ssmtp: Cannot open smtp.gmail.com:587

Issues related to software problems.
Post Reply
rtcary
Posts: 140
Joined: 2005/10/13 18:40:55
Contact:

ssmtp: Cannot open smtp.gmail.com:587

Post by rtcary » 2016/03/28 20:16:00

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

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: ssmtp: Cannot open smtp.gmail.com:587

Post by gerald_clark » 2016/03/28 21:56:20

That should be gmail.com, not gmail.con.

rtcary
Posts: 140
Joined: 2005/10/13 18:40:55
Contact:

Re: ssmtp: Cannot open smtp.gmail.com:587

Post by rtcary » 2016/03/28 23:53:17

I was hoping -- really hoping that the dumb mistake would solve my problem -- no such luck. Same error -- darn it.

Todd

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: ssmtp: Cannot open smtp.gmail.com:587

Post by aks » 2016/03/29 16:34:52

Can you open a socket to gmail (try nc smtp.gmail.com 587 or telnet smtp.gmail.com 587)? You should get the banner back (something like 220 smtp.gmail.com ESMTP a1sm30001897wje.43 - gsmtp), if you don't check firewall and SELinux issues.

rtcary
Posts: 140
Joined: 2005/10/13 18:40:55
Contact:

Re: ssmtp: Cannot open smtp.gmail.com:587

Post by rtcary » 2016/03/29 16:49:27

Solved!
I had to insert a line about the location of the certs and then work around the Gmail 2-step authentication.

Now I have a minor problem: get the source of the email not to be Apache -- instead, my email address, if that is possible.

Todd

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: ssmtp: Cannot open smtp.gmail.com:587

Post by aks » 2016/03/30 16:03:28

Eh?
Whatever is sending the mail simply needs to "mark" it as from <user>@<fqdn>.
What are you using and what is happening? Can you expand?

rtcary
Posts: 140
Joined: 2005/10/13 18:40:55
Contact:

Re: ssmtp: Cannot open smtp.gmail.com:587

Post by rtcary » 2016/03/30 16:17:52

I have actually solved most of the problem by inserting

FromLineOverride=YES

The remainder of the problem has to do with Google. I have my account (i.e. bugsbunny@gmail.com) however I have one user on the account: todd@aristesoftware.com. Regargless of where the email originates, bugsbunny@gmail.com is the From. I may try another ISP and see what happens.

Todd

Post Reply