Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a mail server that uses postfix to relay all the outbound mail through Gmail's smtp servers. Now I have another internet provider and this one is through a SOCKS proxy connection.

How can I setup my postfix server to route all its outbound mail traffic to the SOCKS proxy?

share|improve this question
1  
Why would you want to do this? As far as I know, postfix doesn't support SOCKS proxies. Additionally, you really ought to go back and "accept" answers to your previous six questions. Having a "0% accept rate" isn't doing you any favors at the moment. –  EEAA Feb 25 '12 at 0:06
    
Ok Sorry, i am just new here, i already accept my questions. –  nerdhacker Feb 25 '12 at 1:04
    
I need to do this cause my internet connection is trough a socks proxy server, to be more explicit, i have to do an shh tunnel to another server to gain internet access, then i can setup my apps with socks proxy to 127.0.0.1:1080 to use them, i already know about "tsocks" to socksificate an application that does not supports proxys, or also "proxychains" , but i dont know how (or if is possible) to setup Postfix with them, i just need help on however can be the way to route Postfix outgoing traffic to 127.0.0.1:1080 . Thanks –  nerdhacker Feb 25 '12 at 1:14
add comment

1 Answer

up vote 2 down vote accepted

First off, what situation landed you in such an awkward internet connection scenario? I've seen a lot of messed up configurations, but requiring customers to tunnel all of their traffic to a remote ssh server is absurd. I must say, it sounds like you're perhaps trying to run a server somewhere where you aren't supposed to, or are trying to fly under the radar somehow.

Anyway, why don't you just make another non-dynamic ssh tunnel for the smtp traffic? Something like:

$ ssh user@host -L:2525:remote.smtp.server:25

Then you can have postfix deliver use localhost:2525 as its "smarthost".

This will be much more straightforward than using a dynamic proxy like you're currently trying to do.

share|improve this answer
    
Ok, this sounds like a great idea. My escenario is like a intermedial dialup server, where customers connect to it to send and recieve mail. Is an akward scenario like you say. But it works good for a lot of people with no internet connection. The new internet connection that i am thinking to use is by a ssh tunnel already. any other suggestion?? –  nerdhacker Feb 25 '12 at 5:33
    
And if the remote smtp server needs authentication?? –  nerdhacker Feb 25 '12 at 5:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.