api2_query using "delmx" with root account not working as expected.
Hello,
We are trying to use the API2 "delmx" function to remove MX records from accounts.
But we are getting the following error.
"This feature requires the 'changemx' option and is not enabled on your account"
We are using the "root" account to instantiate the API2 call like so:
It appears to me as though the "root" account is using the "Standard" feature list. When I enable "change mx" for this list it starts to work. We've assumed the "root" account would have unrestricted access. Is there anyway to change the feature list for the "root" account ? Thanks, John
$apicall = new xmlapi('our.cpanel-server.com','root','pass');
$apicall->api2_query('acpanelaccount','Email','delmx',array(
'domain' => 'thedomain.com',
'exchange' => 'mail.thedomain.com',
'preference' => '10'));
It appears to me as though the "root" account is using the "Standard" feature list. When I enable "change mx" for this list it starts to work. We've assumed the "root" account would have unrestricted access. Is there anyway to change the feature list for the "root" account ? Thanks, John
-
Hello :) To clarify, is the account you are removing the MX record from assigned the default feature list? Have you verified that it's not the feature list assigned to the account that's important, and not the "root" authentication? Thank you. 0 -
Hi cPanelMichael, Yes, the accounts we are trying to remove MX's from are all using packages with feature list "Standard" which has the "change mx" option unticked. After some testing it does appear that the feature list assigned to the account I am trying to remove the MX from needs this feature to do so. I would have thought it would have used the API2 authenticated user's feature list to restrict access for API calls. Is there any way to do this without giving our customers the ability to change mx. Thanks, John 0 -
[quote="John D, post: 1728392">Is there any way to do this without giving our customers the ability to change mx.
There is no way around that restriction as far as I can tell. One possible workaround is to delete the MX record directly from the zone instead of using our API. Thank you.0
Please sign in to leave a comment.
Comments
3 comments