Description

This function configures your Apache SpamAssassin™ options.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/save_spamd_config?api.version=1&allowedips=127.0.0.1,192.168.0.1&maxconnperchild=200&maxchildren=5&pidfile=/var/run/spamd.pid&timeouttcp=30&timeoutchild=300




https://hostname.example.com:2087/cpsess##########/xml-api/save_spamd_config?api.version=1&allowedips=127.0.0.1,192.168.0.1&maxconnperchild=200&maxchildren=5&pidfile=/var/run/spamd.pid&timeouttcp=30&timeoutchild=300




whmapi1 save_spamd_config allowedips=127.0.0.1 maxconnperchild=200 maxchildren=5 pidfile=%2Fvar%2Frun%2Fspamd.pid timeouttcp=30 timeoutchild=300 



{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "save_spamd_config"
  }
}




<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>save_spamd_config</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample
allowedipsstring

IP addresses to authorize to access the spamd daemon.

If you do not specify a value, the spamd daemon allows connections from any IP address.

A comma-separated list of valid IP addresses.

If you set a value for this parameter, it must include 127.0.0.1 in the list of values so that the chkservd daemon can access the spamd daemon.


127.0.0.1,192.168.0.1
maxconnperchildintegerThe maximum number of connections that the spamd daemon allows per child process.A positive integer.200
maxchildrenintegerThe maximum number of children per spamd process.A positive integer.5
pidfilestringThe process ID file.An absolute path and filename./var/run/spamd.pid
timeouttcpinteger

The maximum amount of time that the spamd daemon waits before it abandons a TCP connection.

 

A non-negative integer.

If the value of this parameter is 0, spamd will not abandon TCP connections.


30
timeoutchildinteger

The maximum amount of time that a child process waits before it abandons a TCP connection.

 

A non-negative integer.

If the value of this parameter is 0, child processes will not abandon TCP connections.


300

Returns

This function only returns metadata.