Hi,
I installed a fresh CyberPanel on my Ubuntu 22.04 server running on a Hyper-V virtual machine. The server is hosted at my office, and I have a static IP from my ISP (StormFiber).
Everything seemed fine, the server is live, and CyberPanel is working. However, when I send emails from the server, they get deferred with this error:
connect to alt4.gmail-smtp-in.l.google.com[142.251.190.26]:25: Connection timed out
To troubleshoot, I tried manually connecting to Gmail’s SMTP on port 25 from the server using telnet:
root@*********** :/# telnet smtp.gmail.com 25
Trying 2404:6800:4003:c04::6d...
Connected to smtp.gmail.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP ...
451-4.4.2 Timeout - closing connection.
451-4.4.2 For more information, go to
451 4.4.2 https:// support.google.com/a/answer/3221692
Connection closed by foreign host.
So the server can connect but Gmail closes the connection with a timeout error.
Here’s what I’ve checked so far:
- DKIM, SPF, and DMARC records are correctly set up and verified on MXToolsBox
- Port 25 is open and listening on the server (verified with
ss -tlnp | grep :25
)
- Port 25 is open from outside according to online port checkers
- From my personal Windows PC on the same ISP connection, I can connect to Gmail SMTP on port 25 without issue (using PowerShell
Test-NetConnection
)
Still, emails from CyberPanel/Postfix don’t get through and are deferred with connection timeout errors.
I’m not sure if the ISP is blocking or throttling outbound SMTP despite port 25 being open, or if there’s some other network or firewall issue.
Would appreciate any help or suggestions on what to check next or how to fix this.
Looks to me like you’re attempting to send mail from your server to GMail using port 25. Technically port 25 is the “right” port for mail server to mail server (MTA) communication, but many ISPs,—including office ISPs like StormFiber—will rate limit or throttle that port even if it’s technically open. Gmail has some very firm rules on taking mail from unknown or home IP addresses if reverse DNS (rDNS) or good mail server reputation aren’t in place.
You have two main options:
Use a mail relay (best practice): Set up Postfix to route messages through an SMTP relay such as G-mail (over port 587 with AUTH LOGIN), SendGrid, Mailgun, etc.
Become number 1 on google and help my site running: 1. Better server configuration (check also:) You can do this by the following commands: - this list keep’s getting shorter with every release of PHP 7 and MongoDB ^3.6mr1 Please report every additional extensions which are used.
Proper rDNS (PTR record)
Valid SPF, DKIM, and DMARC
A clean IP reputation
FQDN hostname corresponding to rDNS
Gmail will still delay mail from a new server for hours, in some cases, days, in order to establish trust. I cannot pretend to know what is behind the delay, but using a reliable SMTP relay is a surer and faster alternative.
Thank you for the reply,
I honestly didn’t expect to get a response in the community 
Anyway, I’ve contacted StormFiber support — they told me they’ve unblocked port 25.
I’ve reached out to them multiple times. All they do is check port 25 using an online port checker and send me a screenshot showing it’s open.
Either they don’t understand the actual issue, or they don’t even know whether any restriction exists on port 25. But that’s a whole separate story.
Here’s what I’ve diagnosed so far:
- My cyberpanel is hosted on
cloud.tribalbatteries.com
- I have an SPF DNS entry for my domain
tribalbatteries.com
- I’ve set up DKIM and DMARC
- All records are verified using different online tools
Now, the issue is:
Even if these records were missing, the email should still go to the spam folder — but in my case, the email doesn’t even leave my server. It’s getting stuck there.
My IP had a bad reputation and was listed in several blocklists. I contacted the relevant authorities and got it removed from all of them — now it’s listed in only one (RATS NoPtr).
But even that usually just results in email going to spam, not being blocked entirely.
When I try sending emails to mail-tester.com
(which is just an email testing tool and accepts all emails regardless of reputation or DNS setup), it doesn’t get delivered either.
I would not like to use an email rely at the moment.
I’m stuck, guys. Please help me out.
Thanks.