https://reintech.io/blog/setting-up-mail-server-postfix-almalinux-9
Hello! I have fallowed this tutorial for setting up a mailserver with postfix
The mailserver seems to be working, as I can receive and send e-mails, but I can not set it up in the panel due to stream_socket_client() error.
My SMTP server is hosted on a different host than the panel.
Also, do you need to put your ssh user's creds on the user and password fields?(may be a stupid question but im learning)
Should I make any more changes to Postfix server, any more thats on that tutorial?
Thank you.
#Can't setup mail server
46 messages · Page 1 of 1 (latest)
if I do # telnet [mydomain.tld] 25
I get:
Connecting To [mydomain.tld]...Could not open connection to the host, on port 25: Connect failed
Maybe is something on /etc/postfix/main.cf that I should change? if so, what exactly?
As a reminder, I can send and receive e-mails
You can send and receive from where?
I can send from the mailserver(different VPS from the panel's VPS) to any mail server like Google
I can aswell receive e-mails from external mail servers like Google
Right, so that just means postfix is working
But your panel machine can't reach your mail server for whatever reason
Timeouts are usually firewall or routing related. Some providers even block SMTP connections
my mail server host is hosted by a big hosting provider, so I shouldnt have any problem with this
If the port would had been blocked, then the emailing shouldnt work, right?
https://contabo.com/blog/how-to-set-up-a-smtp-server/
even their documentation speaks about it
yup, its not blocked
Who is your panel provider?
well, its under a vpn hosted by the VPS where I keep the mailserver
its home-self hosted
so its unrelated because I can access any port even if my ISP has blocked it under my self hosted VPN
Right, then look into your VPN being misconfigured
The connection is timing out. So something somewhere is blocking the connection
I can do telnet server-ip 25 in my VPS(where the mailserver is hosted) but not from outside
which..
From your mail server is irrelevant
You need to be doing things from your PANEL machine. That's what is giving you the error
I tried enabling the submission port but I havent gotten me anywhere
That doesn't counter what Balin said.
You need to be testing from your panel server. That is what can't connect to your SMTP server.
Testing from the mail server is pointless
As you've shown, and I've confirmed, postfix is publicly accessible - at least to TCP ping. Your PANEL machine can't reach your mail server. Troubleshoot THAT connection
Enabling submission port doesn't help you. You need to figure out where you're going wrong with your network configuration
may I ask you to do a telnet my-server-ip 25 in private? I can trust you
That isn't going to help you
You need to do your own tests from your own panel server
No I'm not going to telnet some random address
just wonderiing if its something from me..
You've already shown its open to public
This is entirely an issue between your panel server and mail server
As you've been told multiple times
so by saying that you acknowledged that I can send and receive emails from outside, right?
YOU already showed this
So actually troubleshoot your connection BETWEEN the panel and mail server
any hint how..?
also on the username and password fields I should put one of the machine users creds?(like root user)
Its your network. You need to know how to manage it
It's nothing Pterodactyl specific
Only YOU know how you setup authentication on your mail server
ah, so its something else apart from server's users
Auth doesnt come into anything here
Your connection isn't even reaching your mail server. Let alone even getting to the point of checking auth
I tried from 2 different ips to reach the server..nothing ;/
so its confirmed the port 25 isnt blocked(screenshot from panel server side)
Your testing against gmail....
i just tried to confirm port 25 isnt blocked, as for example, I cant reach it with my own IP address
As I said, some providers outright block SMTP.
But if your connection is via a VPN, such would not apply
yep
As you've been told now multiple times. You need to troubleshoot your network issue between your panel server and mail server.
We can't help you with that here.