Spamd Startup Configuration

Valid for versions 82 through the latest version

Version:

82


Last modified: September 29, 2020

Overview

Apache SpamAssassin™ is a spam filter utility that examines incoming email and tests for spam characteristics. If you enable Apache SpamAssassin on your server, the Apache SpamAssassin daemon (spamd) provides the Apache SpamAssassin service to your mail server.

Use the Spamd Startup Configuration interface to configure the startup options for the Apache SpamAssassin daemon.

Enable or disable Apache SpamAssassin

To enable or disable Apache SpamAssassin, use the Enable Apache SpamAssassin™ spam filter setting in WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).

To enable or disable the spamd daemon from the command line, run either of the following series of commands:

  • Enable spamd

    1
    2
    3
    4
    5
    
    rm -f /etc/spamddisable
    touch /etc/spamdenable
    find /etc/chkserv.d/spamd -exec rm -v {} \;
    /usr/local/cpanel/scripts/restartsrv_tailwatchd
    /usr/local/cpanel/scripts/restartsrv_spamd

  • Disable spamd:

    1
    2
    3
    4
    5
    
    rm -f /etc/spamdenable
    touch /etc/spamddisable
    find /etc/chkserv.d/spamd -exec rm -v {} \;
    /usr/local/cpanel/scripts/restartsrv_tailwatchd
    /usr/local/cpanel/scripts/restartsrv_spamd

To enable or disable dormant mode for the spamd daemon, use the Dormant services setting in WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).

For more information on Apache SpamAssassin, read our Spam Filters documentation.

Configure options

To configure the options that the Apache SpamAssassin daemon uses at startup, perform the following steps:

  1. Enter the desired value for the option that you wish to change.
  2. Click Save.

The following table describes the available options:

Option Description Default value Minimum value
Allowed IPs To only allow connections from specific IP addresses to access the spamd daemon, enter a comma-separated list of IP addresses in the Allowed IPs text box. If you do not enter a value, the spamd daemon allows connections from any IP address.
Warning:
If you restrict access to the spamd daemon, you must include the local IPv4 address (127.0.0.1) to ensure that the chkservd daemon can access the spamd daemon. Also, if you use IPv6 on your server, you must also include the local IPv6 address (::1). If you do not include these IP addresses in the Allowed IPs list, the spamd daemon will fail.
127.0.0.1,::1
Maximum Connections per Child Defines the maximum number of connections that a spamd child process may have. After a spamd child process reaches the maximum number of connections, the spamd daemon will abandon the child process. 200 1
Maximum Children Defines the maximum number of child processes that a spamd process can spawn at startup.
Note:
The /usr/local/cpanel/scripts/vps_optimizer script optimizes this value for the amount of memory on your server.
5
Note:
On Virtual Private Server (VPS) systems, this option defaults to 3.
1
PID File Defines a custom location of the spamd.pid file. /var/run/spamd.pid itemFour
TCP Timeout Defines the amount of time, in seconds, that you wish for the spamd daemon to wait before it abandons a TCP connection. If you set the value to 0, the spamd daemon will not abandon TCP connections. 30 1
TCP Child Timeout Defines the amount of time, in seconds that you wish for a child process to wait before it abandons a TCP connection. If you set the value to 0, the spamd daemon child processes will not abandon TCP connections. 300 1

Additional Documentation