View previous topic :: View next topic |
Author |
Message |
JackDog Apprentice
Joined: 09 Sep 2004 Posts: 297 Location: St. Louis, Missoura
|
Posted: Wed Jan 19, 2005 6:31 pm Post subject: postfix, on two different ports at the same time? |
|
|
(PLEASE NOTE THIS HAS NOTHING TO DO WITH RUNNING A MAIL SERVER ON A DSL MODEM)
Some genius with our local ISP tried to block port 25 (incoming) to all DSL subscribers which is fine. Unfortunately, the genius also blocked the outgoing for them. So none of my users can send mail via port 25 from their homes to anyone. My server is fine because it is on a business class network so it has been unaffected. I can access port 25 from anywhere, except a DSL user's home in my area.
A simple solution would be to enable postfix to run on an alternate port. But I dont want to have two config files or worry about tls,sasl separately. Is there a way to mirror postfix through its configs? So it would listen on two ports instead of just one? _________________ Are you intolerant of intolerant people? Tired of being PC yet? |
|
Back to top |
|
|
kaidon n00b
Joined: 01 Nov 2003 Posts: 72
|
Posted: Wed Jan 26, 2005 10:00 pm Post subject: |
|
|
Just put something like:
<your.ip.address.here>:1025 inet n - n - - smtpd
in your /etc/postfix/master.cf and restart postfix.
You then have a second instance of postfix's smtp-daemon listening on port 1025 which shares the config with the default daemon (port 25). |
|
Back to top |
|
|
JackDog Apprentice
Joined: 09 Sep 2004 Posts: 297 Location: St. Louis, Missoura
|
Posted: Wed Jan 26, 2005 10:08 pm Post subject: works great |
|
|
That is perfect. Thank you for the help! _________________ Are you intolerant of intolerant people? Tired of being PC yet? |
|
Back to top |
|
|
forbjok Apprentice
Joined: 21 May 2004 Posts: 207 Location: Hordaland, Norge
|
Posted: Wed Jan 26, 2005 10:16 pm Post subject: |
|
|
I'd go with
Code: | # iptables -t nat -A PREROUTING -p TCP --dport 1025 -j REDIRECT --to-ports 25 |
on the server, where 1025 is the port number to redirect to 25. You can have as many of those as you wish, replacing the 1025 with whatever port(s) you want. That should redirect any incoming connections on the specified port to the local port 25. |
|
Back to top |
|
|
JackDog Apprentice
Joined: 09 Sep 2004 Posts: 297 Location: St. Louis, Missoura
|
Posted: Wed Jan 26, 2005 10:45 pm Post subject: |
|
|
I think for most services using iptables is the way to go, but since postfix has the ability to easily configure itself to listen on two ports I will probably just use that for now. Since its an application level configuration issue, its probably best to keep it there in case I need to restore the machine from backup. Keeps it little more portable.
Thanks though! _________________ Are you intolerant of intolerant people? Tired of being PC yet? |
|
Back to top |
|
|
|