How to force Postfix to send through port 587?

Locked
polevsl
Posts: 3
Joined: Mon 6. Sep 2021, 13:44

How to force Postfix to send through port 587?

Post by polevsl »

Hello!
Please help me to set up Postfix. I need it to send mail through port 587.
Port 25 is closed by the VPS provider.
Keyhelp is installed on a clean Ubuntu 20.04.
By default Postfix sends mail on port 25.
Of course, I always get a "connection timeout" error.
There are a lot of manuals on the internet about to set up and open port 465 and 587.
I have used all my knowledge as well as many variants from manuals on the internet.
As a result, no matter what I do, postfix still tries to send the email on port 25.
Perhaps there are some nuances specifically for Keyhelp?
Or maybe someone can post full configs (main.cf, macter.cf and others), who has mail sent through port 587.

Important. I need specifically to send mail through port 587. Using port 587 as relay through provider's smtp server or google for example is not needed.

I would be grateful for help.
User avatar
ShortSnow
Posts: 251
Joined: Thu 15. Nov 2018, 00:45

Re: How to force Postfix to send through port 587?

Post by ShortSnow »

Hi Port 587 ist for Mailclients already open and default (MSA)

For MTA (Server to Server) ist Port 25 zu use.

In my opinion Switch to a better VPS Service like keyweb.de or ask to open the Port .

Arne
polevsl
Posts: 3
Joined: Mon 6. Sep 2021, 13:44

Re: How to force Postfix to send through port 587?

Post by polevsl »

ShortSnow wrote: Mon 6. Sep 2021, 15:35 Hi Port 587 ist for Mailclients already open and default (MSA)

For MTA (Server to Server) ist Port 25 zu use.

In my opinion Switch to a better VPS Service like keyweb.de or ask to open the Port .

Arne

Yes, it's all clear about the MTA.
But in my case I can't change the VPS.
We just moved our servers to VPS of this provider, besides it is the most convenient and fastest in our country.
But it doesn't want to open port 25.
That's why the question how to open the port 587 as MTA transport.
User avatar
mhagge
Community Moderator
Posts: 487
Joined: Wed 8. Aug 2018, 15:19

Re: How to force Postfix to send through port 587?

Post by mhagge »

Look here: https://serverfault.com/questions/10330 ... er-than-25

The point might be this one:
Point is, if a MTA is configured to use a different port than 25 then also the remote end needs to be configured to use that different port for the communication to be successful.
Since port 25 is the standard you will hardly find a remote server that uses something else, i.e. sending mail is still not possible.
polevsl
Posts: 3
Joined: Mon 6. Sep 2021, 13:44

Re: How to force Postfix to send through port 587?

Post by polevsl »

Yes, thanks, already read that information too. So. there is no other option but to ask the ISP to open a port.
Locked