• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

API :: Enable SpamAssassin for Email account

B

bmwbill42

Guest
Hello.. I have created the following function to enable the spam filter for an account:

function EnableSpam($Username, $DomainName)
{
$req = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?><packet version=\"1.3.4.1\"><spamfilter><set><filter><username>$Username@$DomainName</username></filter><enabled/></set></spamfilter>";
return $this->sendCommand($req);
}

$spam = rpc->EnableSpam(test,test.local);

print_r($spam);

The results of the function are:

Array ( [PACKET] => [SYSTEM] => [STATUS] => error [ERRCODE] => 1014 [ERRTEXT] => Parser error: Cannot parse the XML from the source specified )

After searching through the Plesk 8.4 API documentation I can't seem to find the correct way to enable the SpamAssassin feature on a selected mail account...
 
Back
Top