Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Change ports of mails in queue (postfix)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Royal
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2004
Posts: 78
Location: Hamburg, Germany

PostPosted: Tue Jul 06, 2004 11:41 am    Post subject: Change ports of mails in queue (postfix) Reply with quote

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
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Tue Jul 06, 2004 12:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Tue Jul 06, 2004 12:04 pm    Post subject: Reply with quote

Ooops, to --to-port should have been 25, not 80
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Tue Jul 06, 2004 5:57 pm    Post subject: Re: Change ports of mails in queue (postfix) Reply with quote

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
View user's profile Send private message
Royal
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2004
Posts: 78
Location: Hamburg, Germany

PostPosted: Wed Jul 07, 2004 11:38 am    Post subject: Reply with quote

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
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Wed Jul 07, 2004 12:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Royal
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2004
Posts: 78
Location: Hamburg, Germany

PostPosted: Thu Jul 08, 2004 9:49 am    Post subject: Reply with quote

Worked fine. Thanks :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum