Outbound Emails fail with Connection timed out (os error 110)

Issue Description

Hello I apologize as I new to hosting my own email server. I have Stalwart running on Unraid via Docker Compose connected to a Postgresql db. Incoming email is working just fine, however every outbound email fails with

Expected Behavior

The email should arrive to its destination

Actual Behavior

Connection timed out (os error 110)

Reproduction Steps

Sending any outbound email with my configuration

Relevant Log Output

DEBUG TLS handshake error (tls.handshake-error)
listenerId = “https”
reason = “received corrupt message of type InvalidContentType”
2026-07-28T01:44:52Z DEBUG HTTP connection started (http.connection-start)

2026-07-28T02:26:27Z INFO Connection error (delivery.connect-error)
queueId = 320706820060482048
queueName = “remote”
from = “bbronz3@bbronz”
to = [“[email protected]”]
size = 712
total = 1
domain = “gmail.com”
hostname = “alt1.gmail-smtp-in.l.google.com”
localIp = 0.0.0.0
remoteIp = 108.177.123.27
remotePort = 25
causedBy = SMTP error occurred (smtp.error)
details = “I/O Error”
reason = “Connection timed out (os error 110)”

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

PostgreSQL

Blob Storage

PostgreSQL

Search Engine

PostgreSQL

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

This looks like a network/ISP issue rather than a Stalwart configuration problem. The log shows Stalwart correctly resolved Gmail’s MX server and attempted to connect on port 25, but the connection timed out at the network level, which is not something Stalwart itself controls.

This is almost always caused by your hosting provider or ISP blocking outbound port 25. Many residential ISPs and even some cloud/hosting providers (including common Unraid home-server setups behind residential internet) block outbound TCP port 25 by default to prevent spam abuse. You can verify this yourself:

  • From the Stalwart host/container, try telnet alt1.gmail-smtp-in.l.google.com 25 (or nc -zv <ip> 25). If it hangs and times out, it confirms port 25 is blocked outbound.
  • Check with your ISP/hosting provider whether outbound port 25 is blocked, and whether it can be unblocked (residential ISPs frequently refuse to do this).
  • If port 25 outbound cannot be opened, you’ll need to relay outgoing mail through a smart host (e.g. via SendGrid, Mailgun, your ISP’s SMTP relay, etc.) instead of Stalwart delivering directly to remote MX servers.

Separately, note the TLS handshake error ... InvalidContentType line in your log is unrelated to this outbound issue: it’s on your https listener (inbound HTTP/HTTPS traffic, likely a health check or scanner sending garbage), not the outbound SMTP delivery path.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

Among the etc. is a VPS with stalwart

Appreciate the reply, this makes complete sense, I couldnt test with the 2 commands but Putty has a telnet option that confirms I can connect to my server via an internal IP with no issue and I timeout when trying an external host.

I have 2 questions, and I apologize for the ignorance. If I opt in to using my ISP relay will that expose any contents of my email to my ISP

Yes, each mailrelay sees each email that it is forwarding. So have good trust relationship with the various owners of a mailrelay.