Re: Specify VPN for postfix

2017-08-02 Thread Abi Askushi
Say you have postfix sending outbound email on eth0 interface and TCP port 25, then you would have: iptables -t nat -A OUTPUT -p tcp -m tcp --dport 25 -j REDIRECT --to-ports You need to change the above to fit your specific network. On Wed, Aug 2, 2017 at 3:10 PM, Y

Re: Specify VPN for postfix

2017-08-02 Thread Yubin Ruan
2017-08-02 15:28 GMT+08:00 Tobi : > 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

Re: Specify VPN for postfix

2017-08-02 Thread Yubin Ruan
2017-08-02 2:39 GMT+08:00 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. Please offer a simple iptable exmples, if you may. Probably I was stuck by some asymmetric routing p

Re: Specify VPN for postfix

2017-08-02 Thread Tobi
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

Re: Specify VPN for postfix

2017-08-01 Thread 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. On Aug 1, 2017 19:23, "Yubin Ruan" wrote: > 2017-08-01 22:54 GMT+08:00 Tom Hendrikx : > > > > > > On 01-08-17 16:46, Wietse Venema wrote: > >> Y

Re: Specify VPN for postfix

2017-08-01 Thread Gary Sellani
tfix-users@postfix.org Reply-to: postfix-users@postfix.org Subject: Re: Specify VPN for postfix Yubin Ruan: > Can anyone tell me how to point postfix to a VPN connection? I have > setup a VPN listening at background on my Ubuntu and I want to point > postfix to that listening port whenever pos

Re: Specify VPN for postfix

2017-08-01 Thread Yubin Ruan
2017-08-02 0:21 GMT+08:00 Yubin Ruan : > 2017-08-01 22:54 GMT+08:00 Tom Hendrikx : >> >> >> On 01-08-17 16:46, Wietse Venema wrote: >>> Yubin Ruan: Can anyone tell me how to point postfix to a VPN connection? I have setup a VPN listening at background on my Ubuntu and I want to point

Re: Specify VPN for postfix

2017-08-01 Thread Yubin Ruan
2017-08-01 22:54 GMT+08:00 Tom Hendrikx : > > > On 01-08-17 16:46, Wietse Venema wrote: >> Yubin Ruan: >>> Can anyone tell me how to point postfix to a VPN connection? I have >>> setup a VPN listening at background on my Ubuntu and I want to point >>> postfix to that listening port whenever postfix

Re: Specify VPN for postfix

2017-08-01 Thread Benny Pedersen
Gary Sellani skrev den 2017-08-01 14:31: Could the host be something like 10.8.0.0/24? make a hostname with multiple A//MX to do this one could simply add ip-addr to /etc/hosts with the hostname wanted for the lan of rfc1918 ips then change relayhost to relayhost = smtp::25 postfix wi

Re: Specify VPN for postfix

2017-08-01 Thread Tom Hendrikx
On 01-08-17 16:46, Wietse Venema wrote: > Yubin Ruan: >> Can anyone tell me how to point postfix to a VPN connection? I have >> setup a VPN listening at background on my Ubuntu and I want to point >> postfix to that listening port whenever postfix try to connect to the >> internet. > > Wietse: >

Re: Specify VPN for postfix

2017-08-01 Thread Wietse Venema
Yubin Ruan: > Can anyone tell me how to point postfix to a VPN connection? I have > setup a VPN listening at background on my Ubuntu and I want to point > postfix to that listening port whenever postfix try to connect to the > internet. Wietse: > You specify > /etc/postfix/main.cf: > relayhost

Re: Specify VPN for postfix

2017-08-01 Thread Gary Sellani
Could the host be something like 10.8.0.0/24?   Original Message   From: wie...@porcupine.org Sent: August 1, 2017 4:01 AM To: postfix-users@postfix.org Reply-to: postfix-users@postfix.org Subject: Re: Specify VPN for postfix Yubin Ruan: > Hi, > Can anyone tell me how to point postfix to

Re: Specify VPN for postfix

2017-08-01 Thread Wietse Venema
Yubin Ruan: > Hi, > Can anyone tell me how to point postfix to a VPN connection? I have > setup a VPN listening at background on my Ubuntu and I want to point > postfix to that listening port whenever postfix try to connect to the > internet. You specify /etc/postfix/main.cf: relayhost = smtp

AW: Specify VPN for postfix

2017-08-01 Thread Tobi
routing aka source based routing on postfix server to ensure answers from postfix go back via the same gateway they came in. Cheers tobi - Originale Nachricht - Von: Yubin Ruan Gesendet: 01.08.2017 - 06:07 An: postfix-users@postfix.org Betreff: Specify VPN for postfix > Hi, > Can

Re: Specify VPN for postfix

2017-08-01 Thread wilfried.es...@essignetz.de
Am 01.08.2017 um 06:07 schrieb Yubin Ruan: > Hi, > Can anyone tell me how to point postfix to a VPN connection? I have > setup a VPN listening at background on my Ubuntu and I want to point > postfix to that listening port whenever postfix try to connect to the > internet. Hi, read description o

Re: Specify VPN for postfix

2017-07-31 Thread li...@lazygranch.com
Take a look at your header file when using the VPN to email yourself. I think what you want happens automatically. Received: from [10.8.0.6] (unknown [MYIPADDRESS]) 10.8.0.6 is the local IP space created by my VPN. But my IP address also shows up, so hopefully a guru will chime in as to how this

Specify VPN for postfix

2017-07-31 Thread Yubin Ruan
Hi, Can anyone tell me how to point postfix to a VPN connection? I have setup a VPN listening at background on my Ubuntu and I want to point postfix to that listening port whenever postfix try to connect to the internet. Thanks, Yubin