On Mon, 23 Mar 2020 15:05:17 -0400 (EDT) Wietse Venema <wie...@porcupine.org> wrote:
> >Ranjan Maitra: > > 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? > > Before VPN goes down: > > # postconf defer_transports=smtp > # postfix reload > > After VPN comes up: > > # postconf -X defer_transports > # postfix reload > > Wietse > Thank you for this! I am very new to this so would like some more advice. Where do I put this? Also, I have control over it going up but not always over it going down (which appears to be sometimes arbitrary). How do I do that? Btw, in case this matters, my VPN is through Cisco's Anyconnect VPN with Okta's 2-factor authentication. NetworkManager's openconnect VPN does not work any more for me because of the 2-factor authentication (or at least I could not figure it out). Many thanks again and best wishes, Ranjan