Cloudmark is now part of Proofpoint. Learn More

About Proofpoint

Order of startup for CMAE, spamd, and the MTA


When the Unix system boots, both spamd and the Cloudmark Authority Engine (CMAE) must be started. This article describes the required order of startup.


CMAE and spamd run independently, and each one can be started, stopped, or restarted without stopping or restarting the other. However, if spamd is running and CMAE is not, then messages will be scored by spamd and delivered by the MTA without any scoring by Authority.

The suggested order of startup is as follows:

  1. Start CMAE.

    CMAE startup requires two to three minutes while CMAE checks for updates from Cloudmark, and it cannot process messages or respond to spamd during this period. Starting CMAE first ensures that it is ready to score messages when they arrive. However, it can be started or stopped at any time without restarting spamd. Similarly, there is no need to restart CMAE if spamd restarts. See the example CMAE control script below.

  2. Set the Cloudmark library path.

    Since the Authority Plug-In uses a Cloudmark library file that is not in a standard library location, you need to make this environment variable setting before calling spamd (or any command that loads SpamAssassin). For example:

    export LD_LIBRARY_PATH=/etc/mail/spamassassin/cmae/cloudmark/lib
  3. Start spamd.

    Once spamd is running, you do not need to restart it when stopping or restarting CMAE. See the example spamd startup script below.

  4. Start the MTA.

    When restarting CMAE after boot time, you may wish to stop the MTA in order to prevent delivery of unfiltered messages.

Example CMAE control script

A simple CMAE control script might include these lines:

    cd /etc/mail/spamassassin/cmae
    # rm cloudmark/micro_updates/*.aes   # uncomment to avoid spamd hanging
    cloudmark/bin/cmaed restart

Example spamd startup script

The typical startup script for spamd is called spamassassin and is located in /etc/init.d (in the Linux environment). Various spamassassin startup scripts exist; below is a simplified example designed to work with CMAE:

case "$1" in
   /etc/mail/spamassassin/cmae/cloudmark/bin/cmaed start
   echo -n "Starting spamd: "
   export LD_LIBRARY_PATH=/etc/mail/spamassassin/cmae/cloudmark/lib
   start-stop-daemon --start /usr/sbin/spamd
   echo -n "Stopping spamd: "
   start-stop-daemon --stop /usr/sbin/spamd
   echo "Usage: /etc/init.d/spamassassin {start|stop}"
   exit 1
exit 0
Site Map  •  Privacy Policy  •  ©2002–2020 Cloudmark, Inc.