Scenario: Mail account is only accessible behind a VPN connection, how to keep on using Apple Mail Client for your email accounts.
- Keyboard Meastro
- Shimo VPN client
- Some Unix knowledge
- First we need to make sure that the settings for the VPN client, has set the routing of the internal network(s) to be used via the VPN.
- Add the needed DNS entries to your /etc/hosts file. For obvious reason do I not enter these here. Sufficient to say:
- Figure out what the internal servers are,
- Or they are provided by your local IT admin.
- Prepare your "Keyboard Maestro" actions.
In Keyboard Maestro you have the option to use variables. You can also create an variable in the Apple Script you have as part of the complete script. Then this variable is accessible by the Apple Script as well as the KM script.
Below the Apple Script step to access the VPN of my choosing
Thanks to the value we set in the variable we now have in effect created an BOOL. Next step is an If-Then action I have added to make use of the BOOL I just created.Now the BOOL is used and with a press of a key I can start the VPN, and make sure that my Mail Clients, has the needed account online or offline based on the connected state.