qpsmtpd Wiki


You are here: start » deploy » runit


You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.


You don't have an account yet? Just get one: Register

Forgotten your password? Get a new one: Set new password



runit is a cross-platform Unix init scheme with service supervision, designed as a replacement for sysvinit, and other init schemes. It runs on GNU/Linux, *BSD, MacOSX, Solaris, and can easily be adapted to other Unix operating systems.

runit can replace or work with an existing init scheme such as sysvinit, *BSD init, or MacOSX init.


Some benefits of runit include:

  • having processes restarted if something fails
  • having a standard, consistent method for sending signals
  • avoiding PID file races
  • a well documented license agreement

Additional information is available at:

daemontools is an alternate service supervision package that comes with the typical qmail install. Its FAQ provides some good information on the general benefits of service supervision.


Using with forkserver

Once runit is running, getting it to supervise qpsmtpd-forkserver is as simple as creating a run script in the right directory:

# mkdir /var/service/qpsmtpd
# cat >/var/service/qpsmtpd/run <<EOT
> #!/bin/bash
> /path/to/qpsmtpd/qpsmtpd-forkserver --detach -u smtpd -p 25
# chmod 755 /var/service/qpsmtpd/run

runit will automatically load the new service creating a runsv service supervisor for the service. The runsvdir process checks for new directories under the service directory at least every five seconds.

Additional Information

SME Server uses a configuration with a single init.d script that is linked to all the rc.d startup scripts combining familiar SysV startup with the benefits of service supervision. Additional information is available at: