Author Topic: Howto change port where postfix listens  (Read 2797 times)

ron_uit_best

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Howto change port where postfix listens
« on: October 09, 2011, 02:22:49 pm »
Hi,

I have recently moved and now I have a provider that blocks port 25. Since I had this provider also in the past I use Rollernet to redirect port 25 to 2525 on my mailserver then. I dropped the provider and had no more the problem of port 25 being blocked, but kept Rollernet as it is convenient to have your mails being saved in case the server was down. Now I moved so I NEED rollernet again.

My configuration worked a week ago (before I moved). Now it doesn't. In ROllernet I changed the IP adress to the one where I am now. It is not static, but as long as it stays the same no problem right? In my router I pointed out that all traffic coming in on port 2525 must go to Ebox. Now I need Ebox to listen on port 2525 for incoming mail traffic. How do I do that? I tried it in the firewall, I also changed master.cf (replace smtp for 2525 which I used to do in the past before I used ebox). Doesn't work. What am I missing?

This happens if I telnet from my pc to the zentyal server (from the inside so port 25 looks open, but from the outside it is closed)

Code: [Select]
ron@mydomain:/var/log$ telnet mydomain.nl 25
Trying 84.31.132.74...
Connected to mydomain.nl
Escape character is '^]'.
220 Mydomain ESMTP Postfix (Ubuntu)
quit
221 2.0.0 Bye
Connection closed by foreign host.
ron@Noordkriek:/var/log$ telnet mydomain.nl 2525
Trying 84.31.132.74...

It doesn't connect to 2525. My router is setup to forward 2525 to the server. What do I need to setup in Zentyal?

Kind regards, Ron (formerly from Best, now from Tilburg, NL)
« Last Edit: October 11, 2011, 09:11:58 pm by ron_uit_best »

ron_uit_best

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Howto change port where postfix listens
« Reply #1 on: October 11, 2011, 09:31:31 pm »
After lots of configuration testing, I found how to configure Zentyal for my problem. So for those who ever encounter the same problem:

Firewall: forward port (so not only in the router, but also in Zentyal)
original destination for me is Zentyal, original port is 2525 (where Rollernet is configured to send mail to)
IP adress destination is the server's one, I also tried 127.0.0.1 but that did not work, it had to be the internal network IP.
Port: different, 25
That was it.
Postfix cannot be changed I assume, so I had to make above rule to forward the 'wrong' port (needed to avoid blocked port 25 from ISP) to the right port.