Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSMTP Cannot open smtp.gmail.com:587
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Sun May 19, 2013 3:36 pm    Post subject: SSMTP Cannot open smtp.gmail.com:587 Reply with quote

I am trying to configure SSMTP to be able to send mail.

I get this error:
Code:

ssmtp: Cannot open smtp.gmail.com:587


My /etc/ssmtp/ssmtp.conf:
Code:

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < MinUserId
# Make this empty to disable rewriting.
root=XXXXXX@gmail.com

# All mail delivered to userid >= MinUserId goes to user, not root.
#MinUserId=1000

# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
mailhub=smtp.gmail.com:587

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
# mailhub=mail.your.domain       
# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?
rewriteDomain=gmail.com
AuthUser=XXXXXX@gmail.com
AuthPass=XXXXXX
FromLineOverride=YES
USE STARTTLS=YES

# The full hostname

# Gentoo bug #47562
# Commenting the following line will force ssmtp to figure
# out the hostname itself.

# hostname=_HOSTNAME_

# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
#FromLineOverride=YES

# Use SSL/TLS to send secure messages to server.
UseTLS=YES

# Use SSL/TLS certificate to authenticate against smtp host.
#UseTLSCert=YES

# Use this RSA certificate.
#TLSCert=/etc/ssl/certs/ssmtp.pem

# Get enhanced (*really* enhanced) debugging information in the logs
# If you want to have debugging of the config file parsing, move this option
# to the top of the config file and uncomment

Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1539

PostPosted: Sun May 19, 2013 6:01 pm    Post subject: Reply with quote

ideanl ...

try adding 'AuthMethod=LOGIN'.

best ... khay
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Sun May 19, 2013 6:19 pm    Post subject: Reply with quote

Quote:

try adding 'AuthMethod=LOGIN'


Unfortunately that didn't fix the problem for me.
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1539

PostPosted: Sun May 19, 2013 6:53 pm    Post subject: Reply with quote

ideanl wrote:
Unfortunately that didn't fix the problem for me.

ideanl ... ok, I've used ssmtp in the past but I'm no expert, however the above config seems like it should work. So, in absence of anything else to go on, the 'mta' and 'ssl' useflags are enabled on the package, and you are able to communicate with gmail via some other method (eg, netcat)?

Code:
% nc smtp.gmail.com 587
nc: using stream socket
220 mx.google.com ESMTP s8sm32923376eeo.4 - gsmtp
^C

best ... khay
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Sun May 19, 2013 7:02 pm    Post subject: Reply with quote

smtp.googlemail.com

port 465

ssl/tls

normal password

^^ what my thunderbird says about it, and its tested and known working on my end.... ^^
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Sun May 19, 2013 7:25 pm    Post subject: Reply with quote

'nc smtp.gmail.com 587' gives me the same response you had. I also do have ssmtp compiled with the mta and ssl use flags.
Back to top
View user's profile Send private message
user
Tux's lil' helper
Tux's lil' helper


Joined: 08 Feb 2004
Posts: 124

PostPosted: Mon May 20, 2013 12:18 am    Post subject: Reply with quote

ideanl,
try
Code:
UseSTARTTLS=YES

instead of
Code:
USE STARTTLS=YES
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Mon May 20, 2013 1:06 am    Post subject: Reply with quote

After changing that, instead of the previous error, I get:

Code:

ssmtp: Authorization failed (535 5.7.8 {BADCREDENTIALS} sg4sm21615605pbc.7 - gsmtp)


Sounds to me like this is worse than the last error.
I am sure that the password I'm using is correct.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Mon May 20, 2013 3:03 am    Post subject: Reply with quote

did you try...

smtp.googlemail.com

port 465

ssl/tls

your using the wrong port..... & possibly the wrong address
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666
Back to top
View user's profile Send private message
ideanl
n00b
n00b


Joined: 31 Mar 2013
Posts: 36

PostPosted: Mon May 20, 2013 5:27 am    Post subject: Reply with quote

I tried port 465 and smtp.googlemail.com and it still doesn't work.
Back to top
View user's profile Send private message
Princess Nell
Guru
Guru


Joined: 15 Apr 2005
Posts: 509

PostPosted: Thu May 23, 2013 8:32 pm    Post subject: Reply with quote

This works fine here:
Code:

root=XXXXXX@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=smtp.gmail.com:587
UseSTARTTLS=YES
AuthUser=XXXXXX@gmail.com
AuthPass=YYYYYYYYYY
FromLineOverride=YES # optional

Using it in mutt via
Code:

set sendmail="/usr/sbin/ssmtp -C /etc/ssmtp/ssmtp.conf.gmail"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum