Change email routing via WHM API

kjg

Well-Known Member
Mar 2, 2004
180
8
168
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.
 

kjg

Well-Known Member
Mar 2, 2004
180
8
168
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")?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,302
2,438
363
cPanel Access Level
Root Administrator
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.
 

kjg

Well-Known Member
Mar 2, 2004
180
8
168
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 ?
 

kjg

Well-Known Member
Mar 2, 2004
180
8
168
Thanks a lot for your help with this.
Really makes my life easier :)
 

kjg

Well-Known Member
Mar 2, 2004
180
8
168
Follow up question:
Is there a way to just list all accounts (or domains) settings for Email Routing?
Where is that info stored?