2017-08-02 15:28 GMT+08:00 Tobi <tobs...@brain-force.ch>: > Am 01.08.2017 um 20:39 schrieb Abi Askushi: >> Since this is socks proxy and not vpn you could redirect postfix traffic >> with iptables to the port your socks proxy listens. Plenty examples on >> google. > > if you redirect the full postfix traffic you might end up in asymetric > routing. > > Most important question: does this postfix accept connections/mails from > the outside world? If it does: which path these connections come to > postfix? Via VPN/Socks or directly?
I only use postfix for delievering mail, not receiving anything from the outside world. So all the connection to postfix come from local programs (on my own laptop). > If **ALL** connections to this postfix come via VPN/Socks simple > iptables rules as suggested by Abi will work. > > Otherwise I gets more complex and the OP needs a routing based on the > source of the pakets. The goal is to bring answers from postfix to the > exact same path as the query from outside came in (means correct > interface and gateway). And that can only be achieved by policy based > routing. A workable example will be really appreciated. Yubin