If you change the mail host of a domain already configured on your cPanel server, you must change the email routing so that mail is sent to the correct server.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command.
uapi --user=$username Email set_always_accept domain='$domain.tld' alwaysaccept=$locationPlease note that "$username" must be replaced with the cPanel account's username. While "$domain.tld" must be replaced with the domain that needs the email routing changed. Finally, "$location" must be replaced with "local" if the local mail server will receive mail for the domain or "remote" if it will not.