On Mon, 30 Mar 2020 13:11:42 +0200 Bastian Blank 
<bastian+postfix-users=postfix....@waldi.eu.org> wrote:

> On Mon, Mar 23, 2020 at 01:04:44PM -0500, Ranjan Maitra wrote:
> > So, I am wondering if I it is possible to have a setup whereby postfix is 
> > delayed unless/until VPN is up and running. If VPN is down, then I would 
> > like postfix to be delayed until such time as it comes up. If it is 
> > possible, how do I go about doing this? Other ideas?
>
> I would just reject SMTP connections outgoing on your non-VPN interfaces.
>
> | iptables -A OUTPUT -o $vpn -m tcp --dport 25 -j ACCEPT
> | iptables -A OUTPUT -m tcp --dport 25 -j REJECT
>

So, I was trying this out:

$ sudo iptables -A OUTPUT -o $vpn -m tcp --dport 25 -j ACCEPT
Try `iptables -h' or 'iptables --help' for more information.

Should I be matching with something other than tcp?

Many thanks,
Ranjan

Reply via email to