UVdesk

    • Register
    • Login
    • Search
    • Recent

    Solved IMAP Issue : Warning: imap_open(): Couldn't open stream

    Technical Help
    2
    13
    1558
    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.
    • C
      Christophe last edited by

      Hello,

      I'm trying to configure Uvdesk on my website hosted at O2Switch.
      The application seems to be correctly installed and is running well (admin management feature at least).

      I'm struggling with email configuration using IMAP setting.
      Whatever to option I choose (Gmail or IMAP), this error message is raised each time I try to refresh the mailbox using this PHP command :

      php bin/console uvdesk:refresh-mailbox xxx@xxx.com

      Here's below error message raised (after different setting for host field)

      Using Gmail
      WARNING [php] Warning: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX ["exception" => ErrorException { …}]

      Using IMAP
      WARNING [php] Warning: imap_open(): Couldn't open stream mail.xxxx.com:993 "exception" => ErrorException { …}]
      WARNING [php] Warning: imap_open(): Couldn't open stream mail.xxxx.com:145 "exception" => ErrorException { …}]
      WARNING [php] Warning: imap_open(): Couldn't open stream {mail.xxxx.com:993} "exception" => ErrorException { …}]

      bacfec8c-7e17-4e84-98aa-d6da5d364bb9-image.png

      I hope one of you will have an idea to help me undrestand what is going wrong.

      (Attached a screenshot of uvdesk.yaml conf.)

      5eb21e5c-9df0-4e90-9fe6-295f24733837-image.png

      1 Reply Last reply Reply Quote 0
      • C
        Christophe last edited by

        Hi,

        I found a solution to fetch the mailbox. The host field was changed withthis new string :

        {mail.xxx.com:993/notls}INBOX

        My question is, even i use the secured 993 port, is this connection well secured ? I'm not very confident with the "notls" mention.

        Thank you,

        Christophe.

        peopleinside 1 Reply Last reply Reply Quote 0
        • peopleinside
          peopleinside community specialist mod admin @Christophe last edited by

          Hi @Christophe, I think port 993 is secure

          UVdesk passionate | Community moderator | External consultant

          If you need help with the community you can visit https://helpdesk.peopleinside.it/it/blog/uv
          You can always get in touch also with the UVdesk team
          https://support.uvdesk.com/en/

          1 Reply Last reply Reply Quote 0
          • C
            Christophe last edited by

            Unfortunately, I got it wrong: {mail.xxx.com:993/notls}INBOX is not working (probably a clear cache issue makes me think it was working but it is not.)

            Need to go back with unsecured port to make it working again : {mail.xxx.com:143/notls}INBOX

            This still not working with IMAP/SSL conectivity.

            Any idea ?

            (It's works fine with outgoing message, using a secured SMTP 465 port ...)

            peopleinside 1 Reply Last reply Reply Quote 0
            • peopleinside
              peopleinside community specialist mod admin @Christophe last edited by

              @Christophe I think you cannot use a secure port 993 without TLS/SSL or will be an insecure port.
              I do not suggest to use email that doesn't support secure connection as you will have security issues.

              Port 465 should be also secure, I don't think can work without TLS/SSL

              UVdesk passionate | Community moderator | External consultant

              If you need help with the community you can visit https://helpdesk.peopleinside.it/it/blog/uv
              You can always get in touch also with the UVdesk team
              https://support.uvdesk.com/en/

              1 Reply Last reply Reply Quote 0
              • C
                Christophe last edited by

                You're totally right. I'd really like to configure it as a secure way but I can't find the exact string to use for Host field with SSL connectivity :

                {mail.xxx.com:993/ssl}INBOX seems to not working.

                Anyway, thank you for your support.

                peopleinside 1 Reply Last reply Reply Quote 0
                • peopleinside
                  peopleinside community specialist mod admin @Christophe last edited by

                  @Christophe Let me check my istall.
                  You can try {domain.ext:993/imap/ssl}INBOX

                  UVdesk passionate | Community moderator | External consultant

                  If you need help with the community you can visit https://helpdesk.peopleinside.it/it/blog/uv
                  You can always get in touch also with the UVdesk team
                  https://support.uvdesk.com/en/

                  1 Reply Last reply Reply Quote 0
                  • C
                    Christophe last edited by

                    I tried with the same structure but without success.

                    I need to find a way to put the refresh php query on a debug mode. Maybe the issue will be more easy to understand.

                    peopleinside 1 Reply Last reply Reply Quote 0
                    • peopleinside
                      peopleinside community specialist mod admin @Christophe last edited by

                      @Christophe I'M using this settings and works, if this doesn't works maybe you can have a mail server issue.
                      Don't know sorry.

                      UVdesk passionate | Community moderator | External consultant

                      If you need help with the community you can visit https://helpdesk.peopleinside.it/it/blog/uv
                      You can always get in touch also with the UVdesk team
                      https://support.uvdesk.com/en/

                      1 Reply Last reply Reply Quote 0
                      • C
                        Christophe last edited by

                        Once again, thank you Marco for your support.

                        I found a valid host string to fetch the mailbox. Thanks to an extra string (/novalidate-cert) the connection is up and messages are well fetched. I'm not an expert but it seems to me that is it a secure way to access the mailbox.

                        {mail.xxxx.com:993/imap/ssl/novalidate-cert}INBOX

                        peopleinside 1 Reply Last reply Reply Quote 0
                        • peopleinside
                          peopleinside community specialist mod admin @Christophe last edited by

                          @Christophe maybe your certificate is not trusted and this solve the issue. Your connection is now secure seems by a self-signed certificate that is less secure respect to have a valid certificate but better that not having an SSL/TLS connection.

                          In my case I don't need this as I use let's encrypt certificate who is recognized.

                          I'm happy to read you resolved.
                          Maybe you can contact the control panel or the software that manage the email and suggest to support a valid certificate recognized so you don't need to bypass the certificate validation.

                          UVdesk passionate | Community moderator | External consultant

                          If you need help with the community you can visit https://helpdesk.peopleinside.it/it/blog/uv
                          You can always get in touch also with the UVdesk team
                          https://support.uvdesk.com/en/

                          1 Reply Last reply Reply Quote 0
                          • C
                            Christophe last edited by

                            Good point!

                            I also installed a Let's encrypt certificate, but before installing UVdesk on my website.
                            I probably need to renew it. I'll do it and see if that fixes this problem.

                            peopleinside 1 Reply Last reply Reply Quote 0
                            • peopleinside
                              peopleinside community specialist mod admin @Christophe last edited by

                              @Christophe umh I think email certificate is managed by your control panel. Don't now but if your certificate is expired maybe you have issue, if still be valid should be not a problem if you installed after the certificate release the uvdesk 🙂

                              UVdesk passionate | Community moderator | External consultant

                              If you need help with the community you can visit https://helpdesk.peopleinside.it/it/blog/uv
                              You can always get in touch also with the UVdesk team
                              https://support.uvdesk.com/en/

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