Hi all.
I a have written some integration scripts.
So I do see that the MX is being added to direct admin.
The issue is when I do a dig against the box the MX record that I created this way does not respond.
As soon as I add a record within the DirectAdmin Web Gui it will show the one I created but not the one I created with the above script.
So not sure what is going on with that.
Has anyone ever experianced this sort of issue and if so how did you resolve it?
Regards
I a have written some integration scripts.
Code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://<domain>:2222/CMD_API_DNS_ADMIN');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "domain=bob.com&name=bob.com&type=MX&value=10&mx_value=mx.test.com.&ttl=3600&affect_pointers=yes&json=yes&action=add");
curl_setopt($ch, CURLOPT_USERPWD, 'admin:password');
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
print_r($result);
curl_close($ch);
?>
So I do see that the MX is being added to direct admin.
The issue is when I do a dig against the box the MX record that I created this way does not respond.
As soon as I add a record within the DirectAdmin Web Gui it will show the one I created but not the one I created with the above script.
So not sure what is going on with that.
Has anyone ever experianced this sort of issue and if so how did you resolve it?
Regards