View previous topic :: View next topic |
Author |
Message |
Royal Tux's lil' helper


Joined: 15 Jun 2004 Posts: 78 Location: Hamburg, Germany
|
Posted: Tue Jul 06, 2004 11:41 am Post subject: Change ports of mails in queue (postfix) |
|
|
Hey folks,
Due to a problem with rav antivirus which listens on port 10025 I have now some mails (approx. 500) in the queue which cant be delivered because no rav listens on 10025. How can I change that port to 25?
Any suggestions? |
|
Back to top |
|
 |
kpack Tux's lil' helper

Joined: 29 Mar 2004 Posts: 137
|
Posted: Tue Jul 06, 2004 12:02 pm Post subject: |
|
|
Why don't you just redirect port 10025 to port 25 using iptables:
iptables --table nat -j REDIRECT -A PREROUTING --proto tcp --dport 10025 --to-ports 80 |
|
Back to top |
|
 |
kpack Tux's lil' helper

Joined: 29 Mar 2004 Posts: 137
|
Posted: Tue Jul 06, 2004 12:04 pm Post subject: |
|
|
Ooops, to --to-port should have been 25, not 80 |
|
Back to top |
|
 |
kashani Advocate


Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Tue Jul 06, 2004 5:57 pm Post subject: Re: Change ports of mails in queue (postfix) |
|
|
Royal wrote: | Hey folks,
Due to a problem with rav antivirus which listens on port 10025 I have now some mails (approx. 500) in the queue which cant be delivered because no rav listens on 10025. How can I change that port to 25?
|
If you pull the port changes out of where ever you put them, porbably master.cf, postfix should requeue them in an hour or so. Also you can run postfix flush which may speed it up. I know this works if you have messages queued to go to the wrong server, but I've never had to do it for the wrong port.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
 |
Royal Tux's lil' helper


Joined: 15 Jun 2004 Posts: 78 Location: Hamburg, Germany
|
Posted: Wed Jul 07, 2004 11:38 am Post subject: |
|
|
Thanks for the answers.
I'm currently not using iptables. How should the rules-file look like when only want to use this rule. -> what is needed in the rules-file? |
|
Back to top |
|
 |
kpack Tux's lil' helper

Joined: 29 Mar 2004 Posts: 137
|
Posted: Wed Jul 07, 2004 12:21 pm Post subject: |
|
|
Since you only need this temporarily to clear out your postfix queue (using "postfix flush" as kashani suggested), you don't need to add the rule to any file. Just execute the suggested command as root from the command line.
However, if you've never used IPTABLES, you'll need to compile it into your kernel before you can do this. If you think you might to use iptables for more than just this, you might want to look at shorewall. For just this, it would be more complicated. For configuring a real firewall, it makes things much easier. |
|
Back to top |
|
 |
Royal Tux's lil' helper


Joined: 15 Jun 2004 Posts: 78 Location: Hamburg, Germany
|
Posted: Thu Jul 08, 2004 9:49 am Post subject: |
|
|
Worked fine. Thanks  |
|
Back to top |
|
 |
|