How can you automatically change the email routing for all domains?
This can be accomplished with the following script:
Running this script will automatically change the email routing for all domains to either local or remote based on the MX records that are set on the domains zone that is located on the server.
This means that if a domain uses remote DNS and it's only pointed to your server via A record, the routing will not change.
To run the script you will need to use the script with the following flag as a safety precaution:
For more information on email routing, you can visit the following link to the documentation: