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" <ablacktsh...@gmail.com> wrote:

> 2017-08-01 22:54 GMT+08:00 Tom Hendrikx <t...@whyscream.net>:
> >
> >
> > 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:
> >>> You specify
> >>> /etc/postfix/main.cf:
> >>>   relayhost = smtp:[host on other side of tunnel]
> >>
> >> Gary Sellani:
> >>> Could the host be something like 10.8.0.0/24?
> >>
> >> I wrote 'host' not 'network block'.
> >>
> >> Consider the network as a collection of layers. An example applicable
> >> to Postfix looks like: physical layer (ethernet), network layer
> >> (IP), transport layer (TCP), and application layer (SMTP). In this
> >> architecture, an SMTP destination is a domain or host, where the
> >> host may be specified as an IP address. It's not an IP address block
> >> nor is it an ethernet broadast domain.
> >>
> >>       Wietse
> >>
> >
> > Maybe you (the OP) should clarify what you mean with 'connect to the
> > internet'. Does this mean accepting email from hosts 'on the internet',
> > does it mean sending email to random hosts 'on the internet', or does it
> > mean something else? Explain in laymen terms what you're trying to do,
> > your question is too vague.
>
> I have a shadowsocks client listening at 127.0.0.1:8888, and I want to
> point postfix to that specified port when it try to connect to
> internet. Put it in another words, I would like to make that address
> (i.e., 127.0.0,1:8888) something like default gateway so that all my
> network traffic go through it.
>
> Thanks,
> Yubin
>

Reply via email to