Postfix boot-script for Slackware Linux

Category: Software and Systems Engineering
Author: Sean O'Donnell
Wed, May. 2nd, 2007 @ 23:06:29 (MDT)


Here's a simple Postfix boot-script that I created for Slackware Linux.

Postfix doesn't come included with Slackware Linux, so neither does this boot-script. This is intended for users who manually install postfix (from the source) on Slackware Linux.

# /etc/rc.d/rc.postfix
# Postfix init script for Slackware Linux
# Author: Sean O'Donnell 

# define the path to the postfix executable

function start_postfix()
        echo "Starting Postfix..."
        $POSTFIX start

function stop_postfix()
        echo "Stopping Postfix..."
        $POSTFIX stop

function restart_postfix()
        sleep 5

case "$1" in
      start_postfix ;;
      stop_postfix ;;
      restart_postfix ;;
      echo "usage $0 start|stop|restart" ;;

Copy/Paste/Save the script (above) as /etc/rc.d/rc.postfix.

Make the script executable.

chmod +x /etc/rc.d/rc.postfix


You'll then need to add the following lines to (the end of) your '/etc/rc.d/rc.M' file:

# start the postfix SMTP service
if [ -x /etc/rc.d/rc.postfix ]; then
        /etc/rc.d/rc.postfix start

Postfix should now automatically start during the initial boot process.

Copyleft (<) 1998-2019