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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. FreeScout
  3. Connection could not be established with host mail.domain.com [Connection timed out #110]

Connection could not be established with host mail.domain.com [Connection timed out #110]

Scheduled Pinned Locked Moved Solved FreeScout
43 Posts 6 Posters 1.2k Views 6 Watching
  • 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.
  • humptydumptyH Offline
    humptydumptyH Offline
    humptydumpty
    wrote on last edited by humptydumpty
    #1

    Initial posting to keep my sanity while I investigate further. I'm not sure when it started, but I cannot send mail from my Freescout (probably after updating to CR 8.2). I'm getting error:

    Connection could not be established with host mail.domain.com [Connection timed out #110]
    

    FreeScout package 1.11.18

    I'm installing CR 8.2.1 to see if that does anything. I'll try reinserting the pass for the mailbox as the "mailbox test" fails to send, but the regular FS app works fine. I didn't change anything on my end.

    Edit 1: so freescout failed to send the mailbox test and spat an error: make sure port 587 is open. I'm guessing Hetzner changed something?

    Edit 2: Port 587 is open according to a test I ran on https://www.yougetsignal.com/tools/open-ports/

    Edit 3: Now I'm getting error: mail.domain.com is not available on 993 port. Make sure that mail.domain.com address is correct and that outgoing port 993 on YOUR server is open. I checked using the online site above, and port 993 is open.


    manage > mail settings > system emails > send test to this test is being sent and received as expected

    manage > mailbox > connection settings > sending emails and fetching emails both of these are failing

    Edit 4: In my CR dashboard > Profile > App Password: I created a new pass and saved that for my mailbox in FS. Issue persists.

    Sending/Receiving at the mailbox in Roundcube works correctly. It's definitely a Freescout issue and not SMTP/hosting/port related.

    Edit 5: OK, so under Manage > Logs

    Fetch Errors:

    Error: connection failed - stream_socket_client(): Unable to connect to ssl://mail.domain.com:993 (Connection timed out); File: /app/code/overrides/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php (94)
    

    Send Errors:

     Connection could not be established with host mail.domain.com [Connection timed out #110]; File: /app/code/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php (271) 
    
    1 Reply Last reply
    1
    • humptydumptyH humptydumpty marked this topic as a question on
    • humptydumptyH Offline
      humptydumptyH Offline
      humptydumpty
      wrote on last edited by humptydumpty
      #2

      Under Manage > System > Status:

      App Version 	1.8.159
      Date & Time 	Dec 20, 2024 15:49
      Timezone (.env) 	America/Chicago (GMT-0600)
      Protocol 	HTTPS
      DB 	Mysql (8.0.37-0ubuntu0.22.04.3)
      Web Server 	Apache/2.4.58 (Ubuntu)
      PHP Version 	PHP 8.3.6
      PHP upload_max_filesize / post_max_size 	5G / 5G
      PHP Extensions
      OpenSSL 	OK
      PDO 	OK
      Mbstring 	OK
      Tokenizer 	OK
      JSON 	OK
      XML 	OK
      IMAP 	OK
      GD 	OK
      fileinfo 	OK
      ZIP 	OK
      iconv 	OK
      cURL 	OK
      DOM 	OK
      libxml 	OK
      intl 	OK
      pcntl (console PHP) 	OK
      Functions
      shell_exec (PHP) 	OK
      proc_open (PHP) 	OK
      fpassthru (PHP) 	OK
      symlink (PHP) 	OK
      iconv (PHP) 	OK
      pcntl_signal (console PHP) 	OK
      ps (shell) 	OK
      Permissions
      These folders must be writable by web server user (www-data). Recommended permissions: 775
      storage/app/ 	OK
      storage/framework/ 	OK
      storage/framework/cache/data/ 	OK
      storage/logs/ 	OK
      bootstrap/cache/ 	OK
      public/css/builds/ 	OK
      public/js/builds/ 	OK
      public/modules/ 	OK
      Modules/ 	OK
      public/storage (symlink) 	OK
      .env 	OK
      

      For reference: https://github.com/freescout-help-desk/freescout/wiki/Fetching-Emails#troubleshooting-fetching

      @staff possible fix? unsure how to implement this myself https://github.com/freescout-help-desk/freescout/issues/3823#issuecomment-1965724963

      P.S. I'm on v8.2.1 (Ubuntu 24.04 LTS)

      1 Reply Last reply
      1
      • J Offline
        J Offline
        joseph
        Staff
        wrote on last edited by
        #3

        To narrow down the problem: a) is mail server running under Services? b) are you able to connect with some other mail client? maybe install some webmail like roundcube and check if it can check mail.

        humptydumptyH 2 Replies Last reply
        0
        • J joseph

          To narrow down the problem: a) is mail server running under Services? b) are you able to connect with some other mail client? maybe install some webmail like roundcube and check if it can check mail.

          humptydumptyH Offline
          humptydumptyH Offline
          humptydumpty
          wrote on last edited by humptydumpty
          #4

          @joseph service is all green and yes roundcube works fine. I can send and receive mail to all my mailboxes including the FreeScout ones in roundcube. It just doesn’t work in fs. This stopped working suddenly on its own.

          63729815-736e-4710-b427-4ea0701f9123-image.png

          Here's the result of the test initiated from: Manage > Settings > Mail Settings > Send Test To

          0ced0ad2-42b4-4d50-821b-0f82080dcb9a-image.png

          Under Manage > Mailboxes > Connection Settings > Sending Emails > Send Test To resulting error says to make sure port 587 is open and it is since I checked using an online tool by entering my server IP and port 587 and it spat out OPEN. The same goes for fetching emails and says check port 993 and that is open too, so it's not a port issue.

          Off the top of my head I did the following troubleshooting steps:

          • Manage > System > Status: It's all OK and queue:work Running
          • Manage > System > Tools > Clear Cache
          • Restarted app manually
          • App updated overnight to package 1.11.19
          • Checked ports 587 and 993 using online website and confirmed they are OPEN
          • Checked logs as mentioned in FS Troubleshooting page and posted results in initial post
          • Created a new app password (mail) to use with my mailbox (not the issue as my other FS mailboxes aren't working too)
          • Can confirm CR mailserver is working fine as I can send/receive mail in Roundcube to all mailboxes including my Freescount mailboxes. I can also check/send mail from iOS mail app.
          • Freescout test mail settings sent and received the email just fine so the mail settings (SMTP Mailgun) is working in the app. It just refuses to send/fetch at the mailbox level.

          Log errors are:

          Error: connection failed - stream_socket_client(): Unable to connect to ssl://mail.domain.com:993 (Connection timed out); File: /app/code/overrides/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php (94)
          
           Connection could not be established with host mail.domain.com [Connection timed out #110]; File: /app/code/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php (271) 
          
          

          I just opened a ticket upstream: https://github.com/freescout-help-desk/freescout/issues/4441

          1 Reply Last reply
          0
          • J joseph

            To narrow down the problem: a) is mail server running under Services? b) are you able to connect with some other mail client? maybe install some webmail like roundcube and check if it can check mail.

            humptydumptyH Offline
            humptydumptyH Offline
            humptydumpty
            wrote on last edited by humptydumpty
            #5

            @joseph I'm encountering the same send/fetch issues on a fresh Freescout app that I installed under a different subdomain and set it all up manually; no settings/backups were restored or imported.

            Edit: running some more tests...

            cloudron-support --troubleshoot

            Vendor: Hetzner Product: vServer
            Linux: 6.8.0-51-generic
            Ubuntu: noble 24.04
            Processor: AMD EPYC Processor
            BIOS NotSpecified  CPU @ 2.0GHz x 2
            RAM: 7933852KB
            Disk: /dev/sda1        47G
            [OK]    node version is correct
            [OK]    IPv6 is enabled and public IPv6 address is working
            [OK]    docker is running
            [OK]    docker version is correct
            [OK]    MySQL is running
            [OK]    nginx is running
            [OK]    dashboard cert is valid
            [OK]    dashboard is reachable via loopback
            [OK]    box v8.2.1 is running
            [OK]    netplan is good
            [OK]    DNS is resolving via systemd-resolved
            [OK]    Dashboard is reachable via domain name
            [OK]    Domain domain.com is valid and has not expired
            [OK]    unbound is running
            
            

            systemctl status box

            ● box.service - Cloudron Admin
                 Loaded: loaded (/etc/systemd/system/box.service; enabled; preset: enabled)
                 Active: active (running) since Fri 2024-12-20 20:06:23 UTC; 1 day 6h ago
                Process: 353312 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
               Main PID: 106740 (node)
                  Tasks: 11 (limit: 9212)
                 Memory: 103.2M (max: 400.0M available: 296.7M peak: 113.3M)
                    CPU: 7min 50.967s
                 CGroup: /system.slice/box.service
                         └─106740 node /home/yellowtent/box/box.js
            

            I just noticed that IPV6 is enabled in my dashboard > network. I don't remember if I had that enabled before or not.

            • Could it be related to it?

            Another note, I'm using Hetzner and have not configured their firewall. It's been working fine. I also shot a ticket earlier to Hetzner support and they confirmed that 587 and 993 are not being blocked on my server. Port 25 and some other one are blocked by default and I have not requested their opening since I use Mailgun SMTP.

            • Should I manually enable ports 587 and 993 in Hetzner's firewall regardless?
            girishG 1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @humptydumpty just double checking, have you seen https://docs.cloudron.io/apps/freescout/#cloudron-mailbox already? Important thing here is TLS vs SSL distinction in freescout. I remember writing about this somewhere in the forum, let me see if I can find it. I think everything looks fine in your setup, just some freescout configuration.

              humptydumptyH 1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                I think https://forum.cloudron.io/topic/8563/cannot-email-my-local-calibre-books-to-my-kindle-using-my-cloudron-email-credentials/5

                1 Reply Last reply
                0
                • humptydumptyH humptydumpty

                  @joseph I'm encountering the same send/fetch issues on a fresh Freescout app that I installed under a different subdomain and set it all up manually; no settings/backups were restored or imported.

                  Edit: running some more tests...

                  cloudron-support --troubleshoot

                  Vendor: Hetzner Product: vServer
                  Linux: 6.8.0-51-generic
                  Ubuntu: noble 24.04
                  Processor: AMD EPYC Processor
                  BIOS NotSpecified  CPU @ 2.0GHz x 2
                  RAM: 7933852KB
                  Disk: /dev/sda1        47G
                  [OK]    node version is correct
                  [OK]    IPv6 is enabled and public IPv6 address is working
                  [OK]    docker is running
                  [OK]    docker version is correct
                  [OK]    MySQL is running
                  [OK]    nginx is running
                  [OK]    dashboard cert is valid
                  [OK]    dashboard is reachable via loopback
                  [OK]    box v8.2.1 is running
                  [OK]    netplan is good
                  [OK]    DNS is resolving via systemd-resolved
                  [OK]    Dashboard is reachable via domain name
                  [OK]    Domain domain.com is valid and has not expired
                  [OK]    unbound is running
                  
                  

                  systemctl status box

                  ● box.service - Cloudron Admin
                       Loaded: loaded (/etc/systemd/system/box.service; enabled; preset: enabled)
                       Active: active (running) since Fri 2024-12-20 20:06:23 UTC; 1 day 6h ago
                      Process: 353312 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
                     Main PID: 106740 (node)
                        Tasks: 11 (limit: 9212)
                       Memory: 103.2M (max: 400.0M available: 296.7M peak: 113.3M)
                          CPU: 7min 50.967s
                       CGroup: /system.slice/box.service
                               └─106740 node /home/yellowtent/box/box.js
                  

                  I just noticed that IPV6 is enabled in my dashboard > network. I don't remember if I had that enabled before or not.

                  • Could it be related to it?

                  Another note, I'm using Hetzner and have not configured their firewall. It's been working fine. I also shot a ticket earlier to Hetzner support and they confirmed that 587 and 993 are not being blocked on my server. Port 25 and some other one are blocked by default and I have not requested their opening since I use Mailgun SMTP.

                  • Should I manually enable ports 587 and 993 in Hetzner's firewall regardless?
                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #8

                  @humptydumpty said in Connection could not be established with host mail.domain.com [Connection timed out #110]:

                  Should I manually enable ports 587 and 993 in Hetzner's firewall regardless?

                  Oh, this could be it. Are you using the full name in freescout like mail.domain.com ? If so, external ports have to be opened. I guess you got the blocking of those ports from somewhere in the docs? We should probably add some caveats to it.

                  1 Reply Last reply
                  0
                  • girishG girish

                    @humptydumpty just double checking, have you seen https://docs.cloudron.io/apps/freescout/#cloudron-mailbox already? Important thing here is TLS vs SSL distinction in freescout. I remember writing about this somewhere in the forum, let me see if I can find it. I think everything looks fine in your setup, just some freescout configuration.

                    humptydumptyH Offline
                    humptydumptyH Offline
                    humptydumpty
                    wrote on last edited by humptydumpty
                    #9

                    @girish said in Connection could not be established with host mail.domain.com [Connection timed out #110]:

                    @humptydumpty just double checking, have you seen https://docs.cloudron.io/apps/freescout/#cloudron-mailbox already? Important thing here is TLS vs SSL distinction in freescout.

                    Yep, I've seen this and FS has been working correctly for years now.

                    @girish said in Connection could not be established with host mail.domain.com [Connection timed out #110]:

                    Oh, this could be it. Are you using the full name in freescout like mail.domain.com ?

                    Yes, I'm using the full domain (mail.domain.com). Again, I didn't change anything and it was all working fine until now. I switched to Hetzner a couple of months ago, but it's been working fine this whole time. It stopped suddenly on its own, coincidentally around the same time when I upgraded to 8.2/8.2.1.

                    I'll try opening the ports manually in Hetzner's firewall. I'd like to avoid doing that because when I first signed up with Hetzner, I did play with the firewall to open ports and things went south and couldn't undo it. I had to spin up a new one. Hopefully, it plays nice this time.

                    Btw, Freescout and the mail server are on the same server.

                    c07def58-65e2-499d-aac8-0d67490dacf7-image.png

                    35d63f35-fa43-4d6b-b887-ef1334459938-image.png

                    f64630bb-df37-437f-91d9-62b908ed49c8-image.png

                    1 Reply Last reply
                    0
                    • humptydumptyH Offline
                      humptydumptyH Offline
                      humptydumpty
                      wrote on last edited by
                      #10

                      @girish Am I opening incoming, outgoing, or both in Hetzner?

                      image.png

                      1 Reply Last reply
                      0
                      • girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #11

                        @humptydumpty just incoming

                        humptydumptyH 1 Reply Last reply
                        0
                        • girishG girish

                          @humptydumpty just incoming

                          humptydumptyH Offline
                          humptydumptyH Offline
                          humptydumpty
                          wrote on last edited by humptydumpty
                          #12

                          @girish I forgot to ask, UDP or TCP 😧 and allow ANY IPV4/6?

                          2369a374-7ed5-4333-be16-8e50396fc3a1-image.png

                          They won't let me enter the ending port since "it has to be higher" so I left it blank.

                          1 Reply Last reply
                          0
                          • humptydumptyH Offline
                            humptydumptyH Offline
                            humptydumpty
                            wrote on last edited by
                            #13

                            Sigh. Server died upon activating the firewall.

                            image.png

                            1 Reply Last reply
                            0
                            • girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #14

                              @humptydumpty not sure how the firewall works but maybe when you enable one rule, it blocks all others . So , you have to open port 80 and port 443 as well.

                              humptydumptyH 1 Reply Last reply
                              1
                              • humptydumptyH Offline
                                humptydumptyH Offline
                                humptydumpty
                                wrote on last edited by humptydumpty
                                #15

                                Maybe I should open all of these too (except for "any"). I do use SSH and 53 for the DNS makes sense. IDK about the MYSQL and PGSQL though.

                                image.png

                                1 Reply Last reply
                                0
                                • girishG girish

                                  @humptydumpty not sure how the firewall works but maybe when you enable one rule, it blocks all others . So , you have to open port 80 and port 443 as well.

                                  humptydumptyH Offline
                                  humptydumptyH Offline
                                  humptydumpty
                                  wrote on last edited by humptydumpty
                                  #16

                                  @girish That didn't help. I still can't send the test email in FS. Here's what I have activated in the Hetzner firewall. Server is up though so you're right, it does block all unless specified.

                                  ed46cd12-ec56-45a3-b466-498319845818-image.png

                                  1 Reply Last reply
                                  0
                                  • girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #17

                                    @humptydumpty are you using Cloudflare? I can't think of any other reason

                                    1 Reply Last reply
                                    0
                                    • humptydumptyH Offline
                                      humptydumptyH Offline
                                      humptydumpty
                                      wrote on last edited by humptydumpty
                                      #18

                                      For the mail server domain, yes. The mailbox (different domain) is using Bunny. Proxy is off though. CDN acceleration is disabled in Bunny DNS. I didn't change anything at all when this issue started. It's been working fine. I use FS daily. Also, mail is working fine in Roundcube so DNS, ports, wtv are correct. It's FS that's picky, no sending/fetching of mailboxes. Oh, and I have multiple mailboxes using domains on Cloudflare and Bunny. Issue is the same for all. Issue is the same on a fresh FS, so it's not module related either.

                                      Under manage > mail settings > system emails > send test to --- This test email is sent and received fine!

                                      1 Reply Last reply
                                      0
                                      • girishG Offline
                                        girishG Offline
                                        girish
                                        Staff
                                        wrote on last edited by girish
                                        #19

                                        @humptydumpty the system email is configured by cloudron itself. You can ignore this (for this problem).

                                        One thing in your screenshot: I noticed now that FS has changed it's TLS options (very nice). You have to choose STARTTLS for port 587. In yours it is none.

                                        1 Reply Last reply
                                        0
                                        • girishG Offline
                                          girishG Offline
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #20

                                          image.png

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search