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.

First you need to decide who is going to run it. If it is going to be run by root, you need to define two variables:


MILTERWHO=user
MILTERRUNAS="su ${MILTERWHO} -c"
Here, user is the name of the user that the milter will run as. Note that the milter will refuse to run as root.

If you intend to run the milter by hand (as for testing), you may use the following macro definitions instead:


MILTERWHO=yourself
MILTERRUNAS=
Here, yourself is your own login name.

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
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 macros in the slow.init file are obvious from context and will likely never need to be changed.

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.