Connection could not be established with host mail.domain.com [Connection timed out #110]
-
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 expectedmanage > mailbox > connection settings > sending emails and fetching emails
both of these are failingEdit 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)
-
-
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)
-
@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.
Here's the result of the test initiated from:
Manage > Settings > Mail Settings > Send Test To
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 forfetching 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
-
@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?