Results 1 to 9 of 9

Thread: [Solved] SSMTP connecting to Gmail

  1. #1
    Join Date
    Feb 2009
    Beans
    16

    Exclamation [Solved] SSMTP connecting to Gmail

    Until a short while ago (not quite sure when), SSMTP was sending the results of my cron jobs to my email.

    Here's my ssmtp.conf file:
    Code:
    #
    # Config file for sSMTP sendmail
    #
    # The person who gets all mail for userids < 1000
    # Make this empty to disable rewriting.
    root=<MYEMAIL>@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.com
    mailhub=smtp.gmail.com:587
    
    # Where will the mail seem to come from?
    #rewriteDomain=
    
    # The full hostname
    hostname=<MYEMAIL>@gmail.com
    
    # Are users allowed to set their own From: address?
    # YES - Allow the user to specify their own From: address
    # NO - Use the system generated From: address
    FromLineOverride=YES
    
    UseSTARTTLS=YES
    UseTLS=YES
    AuthUser=<MYEMAIL ADDRESS>@gmail.com
    AuthPass=<MYPASSWORD>
    Various Google searches have yielded a few results which imply I need to add a TLS_CA_File= line, but they all reference a RedHat installation and need to add:
    TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt

    The only file with the same name is: /usr/share/ncat/ca-bundle.crt

    My syslog says this:

    Code:
    Apr  1 22:25:20 MYHOST sSMTP[31704]: Unable to set TLS_CA_File="/usr/share/ncat/ca-bundle.crt"
    Apr  1 22:25:23 MYHOST sSMTP[31704]: Creating SSL connection to host
    Apr  1 22:25:23 MYHOST sSMTP[31704]: Invalid response: 501 5.5.4 HELO/EHLO argument MYEMAIL@gmail.com invalid, closing connection. g2sm376695igi.2 - gsmtp (MYEMAIL@gmail.com)
    Apr  1 22:25:23 MYHOST sSMTP[31704]: SSL connection using (null)
    Apr  1 22:25:23 MYHOST sSMTP[31704]: Cannot open smtp.gmail.com:587
    I get the feeling the TLS_CA_File is where the problem is.

    Has anyone else managed to get sSMTP working with Gmail? Is there an alternative to SSMTP?
    Last edited by stormthirst; April 3rd, 2016 at 12:26 PM. Reason: Solved

  2. #2
    Join Date
    Apr 2007
    Beans
    19

    Re: SSMTP connecting to Gmail

    I had a similar issue happen to me the past week or so - it just stopped working.

    I fixed it by changing my hostname: to the following in the ssmtp.conf:

    hostname=localhost

    Before it was hostname:emailaddress@gmail.com
    tachy-on.deviantart.com

  3. #3
    Join Date
    Feb 2009
    Beans
    16

    Re: SSMTP connecting to Gmail

    Thank you! That fixed it.

  4. #4
    Join Date
    May 2008
    Beans
    17

    Re: SSMTP connecting to Gmail

    This fixed my problem too!
    Thanks!
    plus movies plus guaraná =

  5. #5
    Join Date
    Apr 2016
    Beans
    1

    Re: [Solved] SSMTP connecting to Gmail

    me too. stopped working end of march. this fixed it.

  6. #6
    Join Date
    Jan 2014
    Location
    Dublin
    Beans
    43

    Re: SSMTP connecting to Gmail

    Thank you so much for that. I couldn't for the life of me figure out what was going wrong as my email worked before, you saved me a lot of time thanks again


    Quote Originally Posted by pjrettin View Post
    I had a similar issue happen to me the past week or so - it just stopped working.

    I fixed it by changing my hostname: to the following in the ssmtp.conf:

    hostname=localhost

    Before it was hostname:emailaddress@gmail.com

  7. #7
    Join Date
    Jun 2016
    Beans
    1

    Re: [Solved] SSMTP connecting to Gmail

    This also solved my problem.

    Many thanks!

  8. #8
    Join Date
    Jul 2016
    Beans
    1

    Re: [Solved] SSMTP connecting to Gmail

    Thanks solved my problem

  9. #9
    Join Date
    Nov 2013
    Beans
    1

    Re: SSMTP connecting to Gmail

    Quote Originally Posted by pjrettin View Post
    I had a similar issue happen to me the past week or so - it just stopped working.

    I fixed it by changing my hostname: to the following in the ssmtp.conf:

    hostname=localhost

    Before it was hostname:emailaddress@gmail.com
    Worked
    for me as well. Have had this issue for over a year and knew not how to resolve it. Thanks for your help.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •