The slow.init script

The slow.init file is used to start, stop, and restart the slowmilt daemon. It is suitable to install in, for example, /etc/init.d, or /etc/rc.local. The recommended proceedure is to copy or rename it in the /etc/mail/milter/slow directory, from slow.init.pat into slow.init.

Before you may use slow.init in production, you need to edit it and redefine its contents.

Whom to run as

First you need to set who this milter will run as. This setting is only needed to kill the milter, and is only really needed on Solaris systems. The value used here, must match the value assigned to the RunAsUser configuration item:


MILTERWHO=nobody
Here, nobody is the login name of the user identity that the milter will run as if it is executed by root.

How to kill the milter

Next you must set the method used to kill the milter. Just uncomment the appropriate line and comment out the wrong line. The selection might look like this:


#
# The command to kill the milter. Set to be right for your OS.
#
MILTERKILL="/usr/bin/pkill -x -u ${MILTERWHO} ${MILTER}"
#MILTERKILL="/usr/bin/killall ${MILTER}"

Where the milter was installed

In the event you chose to install the slowmilt system in a directory other than the default (/etc/mail/milter/slow), you will need to modify the following define with that new location:


MILTERDIR=/email/filters/slow

Command-line arguments

If you wish to give the slowmilt milter any command-line options at startup, you may define them with the following macro:


MILTERARGS="-Dsource"
Here, -Dsource causes the source file names and line numbers to be printed and logged as part of any error message or warning.

Other settings

Other macros in the slow.init file are obvious from context and will likely never need to be changed.

How to run slow.init

The slow.init script take one of three arguements when it is run:

CommandDoes What
startStart the milter running. If it is already running, the new milter will fail to start because its port is already in use. Creates a semaphore file so that slow.run can detect a stop command.
stopStop the milter. If it is already stopped, this command will print an error. This command removes the semaphore file, then signals the milter to abort. The shutdown of the milter can take a few seconds.
restartRestart the milter. This is the equalivent of stopping and starting the milter with the stop and start commands by hand.

Once you've started the milter, never kill it by hand. If you do, the slow.run script will automatically restart it. Only use slow.init stop to stop the milter.