English
Is it mandatory to have port 25 open or any other alternatives setup for mailcow
Not relevant for server-to-server communication. For client-to-server it can be used.
- Edited
@pkernstock could u please elaborate client to server and server to server with example, if u dont mind, thanks
[unknown] how to use it, where i need to update the config
- Edited
- Best Answerset by Aron
@Aron Really? You should have a basic understanding how the protocol works BEFORE you set up mailcow.
typical mailflow:
You write an email with e.g. Thunderbird oder Outlook
Mail is sent from Thunderbird or Outlook (or Webmail) to your mailcow server via Activesync or SMTP via Port 587
Your mailcows postfix is then contacting the destination mail server via SMTP (this is where port 25 is a must)
Installing and running a mailserver is one of the most complex services you can run. It involves so many components and protocols, and you need basic understanding of all of them.
- Edited
@esackbauer thanks
@esackbauer one last question. it is not possible to send mail from server to server without opening outbound port 25?
- Edited
Sending would be possible via a so called relay server (e.g. smtp2go) which can be configured to use a different port.
However if port 25 is not open inbound to mailcow, you will never receive mails.
Sounds like you want to setup a mail server on a residential internet connection. That is a really difficult topic, because of all the limitiations like port 25 blocked, no PTR DNS record, dynamic IP address, or not having a proper public IPv4 address, as many ISPs are using CG-NAT nowadays.
I did setup of mailcow on azure ubuntu vm, i could able to receive emails, bcz isp allow inbound on port 25, i am unable to send emails again bcz they blocked port 25, i am confused here bcz i read some where we can use 587 or 465 instead of port 25 for server to server communication, if this is a case can i change ports on mailcow config
i am always getting confused answers from chatgpt or online articles,
- Edited
Aron i read some where we can use 587 or 465 instead of port 25 for server to server communication
That is a reference to the so called “relay host” that I mentioned.
Server to server communication is always port 25. However you can put something like a “relay host” in the middle, which receives on a different port, but sends to the destination on port 25.
You don’t need to change your mailcow config files for that, just create a sender dependent transport (where you put the relay host information) in mailcow admin GUI, and configure your domain(s) to use this transport.
- Edited
got it thanks for your info got some more understanding,
i dont want use relay host, because it cost same as direct use of relay host on my use case, i am looking for something to replace relay host to cut costs, example mailcow
Aron i am looking for something to replace relay host to cut costs, example mailcow
Then you need a hosting which has a static IPv4 address and allows port 25 incoming and outgoing.
No “free” hosting would tick all boxes.
got it thanks