#!/bin/sh

# Gerben Wierda, Oct 2001. Adapted from an existing example. I waive every
# copyright on this and I also do not give any warranty.

. /etc/rc.common

##
# Start mail server
##

if [ "$1" == "start" ]
then
	if [ "${MAILSERVER:=-NO-}" = "-YES-" ]
	then
		ConsoleMessage "Starting Postfix mail services"
		/usr/sbin/postfix start
	fi
elif [ "$1" == "stop" ]
then
	ConsoleMessage "Stopping Postfix mail services"
	/usr/sbin/postfix stop
elif [ "$1" == "restart" ]
then
	if [ "${MAILSERVER:=-NO-}" = "-YES-" ]
	then
		ConsoleMessage "Reloading Postfix configuration"
		/usr/sbin/postfix reload
	else
		ConsoleMessage "Stopping Postfix mail services"
		/usr/sbin/postfix stop
	fi
fi


