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