View previous topic :: View next topic |
Author |
Message |
ideanl n00b
Joined: 31 Mar 2013 Posts: 39
|
Posted: Sun May 19, 2013 3:36 pm Post subject: SSMTP Cannot open smtp.gmail.com:587 |
|
|
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 |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun May 19, 2013 6:01 pm Post subject: |
|
|
ideanl ...
try adding 'AuthMethod=LOGIN'.
best ... khay |
|
Back to top |
|
|
ideanl n00b
Joined: 31 Mar 2013 Posts: 39
|
Posted: Sun May 19, 2013 6:19 pm Post subject: |
|
|
Quote: |
try adding 'AuthMethod=LOGIN'
|
Unfortunately that didn't fix the problem for me. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun May 19, 2013 6:53 pm Post subject: |
|
|
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 |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Sun May 19, 2013 7:02 pm Post subject: |
|
|
smtp.googlemail.com
port 465
ssl/tls
normal password
^^ what my thunderbird says about it, and its tested and known working on my end.... ^^ |
|
Back to top |
|
|
ideanl n00b
Joined: 31 Mar 2013 Posts: 39
|
Posted: Sun May 19, 2013 7:25 pm Post subject: |
|
|
'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 |
|
|
user Apprentice
Joined: 08 Feb 2004 Posts: 202
|
Posted: Mon May 20, 2013 12:18 am Post subject: |
|
|
ideanl,
try
instead of
|
|
Back to top |
|
|
ideanl n00b
Joined: 31 Mar 2013 Posts: 39
|
Posted: Mon May 20, 2013 1:06 am Post subject: |
|
|
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 |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Mon May 20, 2013 3:03 am Post subject: |
|
|
did you try...
smtp.googlemail.com
port 465
ssl/tls
your using the wrong port..... & possibly the wrong address |
|
Back to top |
|
|
ideanl n00b
Joined: 31 Mar 2013 Posts: 39
|
Posted: Mon May 20, 2013 5:27 am Post subject: |
|
|
I tried port 465 and smtp.googlemail.com and it still doesn't work. |
|
Back to top |
|
|
Princess Nell l33t
Joined: 15 Apr 2005 Posts: 916
|
Posted: Thu May 23, 2013 8:32 pm Post subject: |
|
|
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 |
|
|
|