Change email routing via WHM API
Is there any way to change "Email Routing Configuration" to "Automatically Detect Configuration" or "Remote Mail Exchanger" via WHM API?
Can't find any such function in the documentation.
-
Hey there! There isn't an API call for that function, but you could make a feature request using the link in my signature and I can bring it up with the team! 0 -
Thank you for your reply Is there any way to change via command line for one account? Or for all accounts (set all to Automatically Detect Configuration")? 0 -
I worked through an strace to see if I could find more details, and came across this call: using the "mxcheck" parameter In the first link you'll see the "MXCHECK-example1.com": "remote" example - which should work for you for multiple accoutns. 0 -
Or could we use Cpanel - UAPI Functions - Email::set_always_accept: and set domain: domain.com alwaysaccept : auto (or remote) Would that do the same thing as WHM - (or cPanel) - Email Routing Configuration ? 0 -
That looks like a good option as well - updated docs for that are here: Update Mail Exchanger type 0 -
Thanks a lot for your help with this. Really makes my life easier :) 0 -
Glad to hear! 0 -
Follow up question: Is there a way to just list all accounts (or domains) settings for Email Routing? Where is that info stored? 0 -
I don't have a good way to show each account's setting. You can find that data from the "mxcheck" value in Return cPanel account's configuration settings so I suppose you could make a loop with that call to check all the domains on the server. 0 -
Thank you. Exactly what we were looking for. 0 -
I'm glad that's working well! 0 -
Thanks for these: 0
Please sign in to leave a comment.
Comments
12 comments