I am using a basic PHP class to run the SpamAssassin Network Protocol commands on a remote server. I installed SpamAssassin following a guide, just skipping the PostFix part.
No matter what command I run (CHECK
, REPORT
, PING
, etc), I only get a blank or empty response.
Here is a basic example of a PING that should return, per the manual: SPAMD/1.5 0 PONG\r\n
. Instead, it's an empty response.
$socket = fsockopen($hostname = 'my-remote-server-ip', $port = 783, $errno, $errstr);
fwrite($socket, "PING SPAMC/1.5\r\n");
$response = fread($socket,99999);
die("<pre>" . print_r($response,1) . "</pre>");
Am I doing something wrong with my writing/reading? What settings should I be checking on my remote server?