PDA

View Full Version : how to delete forwarders by api



remedia
05-17-2005, 07:26 AM
hi,.

how can i delete forwarders?
found nothing on this board or in the docs,..
please help,.

$Socket = new HTTPSocket;
$Socket->connect($daserver,'2222');
$Socket->set_login($dalogin,$dapass);
$Socket->set_method('POST');
$Socket->query('/CMD_EMAIL_FORWARDER',
array(
'Name' => 'name@mydomain.com',
'domain' => 'mydomain.com',
'action' => 'delete'
));

Ronald

jmstacey
05-17-2005, 10:51 PM
I don't know if it can be done through the API, you might have to directly manipulate the necassary files or ask DirectAdmin to add this API function, however a venue which I have not explored is not using DirectAdmin's API which returns nice output but to go directly through DirectAdmin itself.

jmstacey
05-17-2005, 10:52 PM
See: http://www.directadmin.com/forum/showthread.php?s=&threadid=8226

remedia
05-18-2005, 09:14 AM
found it,.
this is the sollution;

$Socket = new HTTPSocket;
$Socket->connect($daserver,'2222');
$Socket->set_login($dalogin,$dapass);
$Socket->set_method('POST');
$Socket->query('/CMD_EMAIL_FORWARDER',
array(
'user' => $name,
'domain' => $domain,
'action' => 'delete',
'select0' => $name
));

Ronald