Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function configures your Apache SpamAssassin™ options.

Examples 


 JSON API
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
 XML API
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
 Command Line
whmapi1 save_spamd_config allowedips=127.0.0.1 maxconnperchild=200 maxchildren=5 pidfile=%2Fvar%2Frun%2Fspamd.pid timeouttcp=30 timeoutchild=300 

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "save_spamd_config"
  }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>save_spamd_config</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

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.

Note:

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.

Note:

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.

Note:

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

300


Returns

This function only returns metadata.