11-14-2026, 05:52 PM
CyberPanel Email Not Sending? Test Whether Your VPS Blocks Port 25 (Tested)
Your mailboxes work, incoming mail arrives, but nothing you send ever reaches Gmail or Outlook. Before you change any CyberPanel setting, check one thing: many VPS providers block outgoing port 25 on new servers to stop spam. Mail servers talk to each other on port 25, so if it's blocked, no setting in the panel can fix it. The test takes ten seconds. We ran it on a CyberPanel 3.0.8 server (Ubuntu 24.04), and we also blocked the port ourselves for a moment to show what a blocked server looks like.
Step 1: The ten-second test
Over SSH, paste this. It tries to reach Gmail's mail server on port 25, and Gmail's sending ports 587 and 465:
On our server, where the provider allows mail:
Then we blocked outgoing port 25 with a firewall rule, the same thing a provider does, and ran it again:
It needs no extra tools. If the first line says BLOCKED on your server, your outgoing mail can't leave.
Want to see the other server answer? This prints its greeting:
Ours answered
. No answer within 8 seconds means blocked.
Step 2: What the mail queue and log show
When port 25 is blocked, mail doesn't bounce straight away. It waits in the queue and the server keeps retrying. Look at the queue:
And at the sending log. On our CyberPanel server there is no /var/log/mail.log. The mail log is in the system journal:
Lines ending in Connection timed out for every destination point to a blocked port. A line with
means that message did leave.
One line that looks scary but isn't: we saw connect to ...[2606:...]:25: Network is unreachable in our log, followed by a normal delivery. That's just the server trying IPv6 first, finding it has none, and falling back to IPv4.
Step 3: If port 25 is blocked
If port 25 is open and mail still doesn't arrive
Then the cause is somewhere else:
Not sure what your result means? Reply below with the three lines from the test (hide your server IP).
Your mailboxes work, incoming mail arrives, but nothing you send ever reaches Gmail or Outlook. Before you change any CyberPanel setting, check one thing: many VPS providers block outgoing port 25 on new servers to stop spam. Mail servers talk to each other on port 25, so if it's blocked, no setting in the panel can fix it. The test takes ten seconds. We ran it on a CyberPanel 3.0.8 server (Ubuntu 24.04), and we also blocked the port ourselves for a moment to show what a blocked server looks like.
Step 1: The ten-second test
Over SSH, paste this. It tries to reach Gmail's mail server on port 25, and Gmail's sending ports 587 and 465:
Code:
for t in gmail-smtp-in.l.google.com:25 smtp.gmail.com:587 smtp.gmail.com:465; do
h=${t%:*}; p=${t#*:}
if timeout 8 bash -c "exec 3<>/dev/tcp/$h/$p" 2>/dev/null; then echo "$t OPEN"; else echo "$t BLOCKED or timeout"; fi
doneCode:
gmail-smtp-in.l.google.com:25 OPEN
smtp.gmail.com:587 OPEN
smtp.gmail.com:465 OPENCode:
gmail-smtp-in.l.google.com:25 BLOCKED or timeoutWant to see the other server answer? This prints its greeting:
Code:
timeout 8 bash -c "exec 3<>/dev/tcp/gmail-smtp-in.l.google.com/25; head -1 <&3"Code:
220 mx.google.com ESMTP ...Step 2: What the mail queue and log show
When port 25 is blocked, mail doesn't bounce straight away. It waits in the queue and the server keeps retrying. Look at the queue:
Code:
mailqCode:
journalctl -t postfix/smtp -n 20 --no-pagerCode:
status=sentOne line that looks scary but isn't: we saw connect to ...[2606:...]:25: Network is unreachable in our log, followed by a normal delivery. That's just the server trying IPv6 first, finding it has none, and falling back to IPv4.
Step 3: If port 25 is blocked
- Ask your provider to open it. Most have a form or ticket for this. Some open it after a few days or after identity checks, and some never do. Run the test again after they answer.
- Or send through a relay on port 587. If port 587 shows OPEN in the test (it usually does), you can send your outgoing mail through an SMTP relay service instead of directly. Your server hands the mail to the relay on 587, and the relay delivers it. Incoming mail isn't affected either way.
If port 25 is open and mail still doesn't arrive
Then the cause is somewhere else:
- It arrives, but in spam: check SPF, DKIM and DMARC. See our CyberPanel email setup guide.
- It's stuck in the queue for another reason: see our mail queue guide in this section. The log line for the message tells you why.
- Only mail from Outlook or a phone fails: that's about the mail app's settings (port 587 or 465 with your full email address as the username), not about port 25.
Not sure what your result means? Reply below with the three lines from the test (hide your server IP).
