Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Navigation

    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Cannot connect with TSL/SSL

    FreeScout
    4
    6
    46
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jordanurbs
      jordanurbs last edited by

      Trying to use a Cloudron mailbox for this.

      Outgoing: I've tried using PHP mail() function as well as manually inserting the Mailgun SMTP details on all 3 ports with either SSL or TSL and nothing will send.

      With PHP mail() selected it tells me to check the logs. This is there in the cloudron app logs but nothing else looks out of place:

      sh: 1: /usr/sbin/sendmail: not found
      

      And with Mailgun selected I get one of the following depending on which port and if SSL or TSL is selected

      stream_socket_enable_crypto(): Peer certificate CN=`*.mailgun.org' did not match expected CN=`smtp.mailgun.com'
      

      OR

      Connection could not be established with host smtp.mailgun.com [ #0]
      

      Doesn't feel like a Mailgun issue as I'm not having issues sending mail elsewhere. When I select Mailgun with no encryption, the test email is successful.

      jimcavoli girish 2 Replies Last reply Reply Quote 0
      • subven
        subven last edited by

        Have you checked the docs? Only SMTP works.

        Can you post your SMTP configuration (maybe censoring personal details like domain names)?

        jordanurbs 1 Reply Last reply Reply Quote 0
        • jimcavoli
          jimcavoli App Dev @jordanurbs last edited by

          @jordanurbs That looks an issue with the TLS implementation underpinning the mail function using peer matching that is too strict/dumb on the hostname. They're using a wildcard cert and for whatever reason PHP is balking at the * wildcard and expecting that to literally be the hostname. This was a known bug in PHP like 7 years ago, but shouldn't be a contemporary problem. What version of PHP are you using?

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @jordanurbs last edited by

            @jordanurbs If you are using a Cloudron mailbox, then you only need to put in Cloudron credentials and not mailgun credentials. Mailgun credentials (I assume for relay?) can be set in Email -> select domain -> outbound mail.

            I have added screenshots for Cloudron email configuration in freescout here - https://docs.cloudron.io/apps/freescout/#cloudron-mailbox

            1 Reply Last reply Reply Quote 1
            • jordanurbs
              jordanurbs @subven last edited by

              @subven the docs say this:

              For sending emails of a specific mailbox, the STMP method has to be selected as php mail() or sendmail wont work on Cloudron.
              

              @jimcavoli the Cloudron default, looks like 7.3

              @girish this took care of it. Thanks for adding that to the docs, makes everything much simpler

              1 Reply Last reply Reply Quote 1
              • jimcavoli
                jimcavoli App Dev last edited by

                Yeah, I think I misinterpreted your question a little - glad you're all set though!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post