Announcement

Collapse
No announcement yet.

unable to connect to tls://smtp.office365.com:587

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • unable to connect to tls://smtp.office365.com:587

    Hi everyone! After I have turned off my local mail server and start using Office 365, I want to change the vbulletin settings so I can use Office 365. I managed to configure OSTicket to send emails using SMTP, but I cant get VB to do the same (both are on the same server).

    This is the message I get from Diagnostics:
    Code:
    Warning: fsockopen(): unable to connect to tls://smtp.office365.com:587 (Connection timed out) in .../vb/mail/smtp.php on line 189 Warning: Unable to connect to SMTP server in .../vb/mail/smtp.php on line 155

  • #2
    Since it is a timeout, it appears something outside of vBulletin is blocking the connection. For instance, Office365 could be blocked by the firewall on the physical machine. You can try switching the port to 465 and try SSL instead of TLS according to this page: https://support.office.com/en-us/art...0-218349f37e2e

    Is OSTicket on the same server and domain?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      Tried SSL, did not work as well.

      OSTicket is on the same machine and domain and uses the same setting ....

      Comment


      • #4
        Not sure how OSTicket works. It could be using a different method to connect to external providers.
        • If you ask your host about using fsockopen in PHP, what is their response?
        • Are they blocking it?
        • What about the value for allow_url_fopen? This should be set to On in the php.ini.
        • What version of PHP are you using? As far as I am aware, OSTicket doesn't support newer versions of PHP yet.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud customization and demonstration site.
        vBulletin 5 Documentation - Updated every Friday. Report issues here.
        vBulletin 5 API - Full / Mobile
        I am not currently available for vB Messenger Chats.

        Comment


        • #5
          Hi and thanks ...

          How do I find out about fsockopen? I manage my own Ubuntu server with Plesk and can change everything.

          allow_url_fopen is ON

          PHP is 7.3.6 as FPM application, change a single line in OSTicket and works like a charm ...

          Comment


          • #6
            any ideas why OSTicket is working and VB not?

            Comment


            • #7
              I have absolutely no idea how OSTicket is coded. vBulletin's SMTP implementation works on many sites. Even this site and all of vBulletin Cloud. I don't know of any that use Office365 though. Nor do I have access to an account to test.

              Are there any firewall messages that could signify blocking the connection with Office365?
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud customization and demonstration site.
              vBulletin 5 Documentation - Updated every Friday. Report issues here.
              vBulletin 5 API - Full / Mobile
              I am not currently available for vB Messenger Chats.

              Comment


              • #8
                Because OSTicket works, I assume the error is somewhere else. One thing to note is the complete absense of any mail software on the webserver, I have completly uninstalled postfix.

                Comment


                • #9
                  SMTP doesn't use mail software on the server unless that is what you tell it to do.

                  vBulletin is telling the Operating System to open a socket to your mail server. Your Operating System is not completing this task and it is timing out.

                  Do you have OpenSSL installed on the server and within PHP? What version of OpenSSL are you using? What version of TLS are you using?
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                  vBulletin 5 Documentation - Updated every Friday. Report issues here.
                  vBulletin 5 API - Full / Mobile
                  I am not currently available for vB Messenger Chats.

                  Comment


                  • #10
                    OpenSSL version OpenSSL 1.0.2g 1 Mar 2016 installed and enabled.

                    tls, tlsv1.0, tlsv1.1, tlsv1.2

                    thanks for helping and your patience
                    Last edited by uspange; Tue 2nd Jul '19, 11:21pm.

                    Comment


                    • #11
                      You should probably upgrade OpenSSL. The latest version (1.1.1c) was released in March of 2018. There have been numerous reported CVE (Common Vulnerabilities and Exposures) against older versions of OpenSSL.

                      https://www.openssl.org/

                      Do you have access to the server's command line? If so, what is the output of the following command?

                      Code:
                      openssl s_client -connect smtp.office365.com:587 -tls1_2
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                      vBulletin 5 Documentation - Updated every Friday. Report issues here.
                      vBulletin 5 API - Full / Mobile
                      I am not currently available for vB Messenger Chats.

                      Comment


                      • #12
                        Code:
                        CONNECTED(00000003)
                        140405436307096:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:362:
                        ---
                        no peer certificate available
                        ---
                        No client certificate CA names sent
                        ---
                        SSL handshake has read 5 bytes and written 7 bytes
                        ---
                        New, (NONE), Cipher is (NONE)
                        Secure Renegotiation IS NOT supported
                        Compression: NONE
                        Expansion: NONE
                        No ALPN negotiated
                        SSL-Session:
                            Protocol  : TLSv1.2
                            Cipher    : 0000
                            Session-ID:
                            Session-ID-ctx:
                            Master-Key:
                            Key-Arg   : None
                            PSK identity: None
                            PSK identity hint: None
                            SRP username: None
                            Start Time: 1562248376
                            Timeout   : 7200 (sec)
                            Verify return code: 0 (ok)

                        Comment


                        • #13
                          The system isn't making a secure connection.
                          Translations provided by Google.

                          Wayne Luke
                          The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                          vBulletin 5 Documentation - Updated every Friday. Report issues here.
                          vBulletin 5 API - Full / Mobile
                          I am not currently available for vB Messenger Chats.

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...
                          X