#!/bin/sh
. /etc/rc.common
if [ "${POSTFIX:=-NO-}" = "-YES-" -a "${MAILSERVER:=-NO-}" = "-YES-" ]
then
ConsoleMessage "Cannot run concurrent postfix and sendmail"
sleep 2
exit
fi
if [ "$1" == "start" ]
then
if [ "${POSTFIX:=-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 [ "${POSTFIX:=-NO-}" = "-YES-" ]
then
ConsoleMessage "Reloading Postfix configuration"
/usr/sbin/postfix reload
else
ConsoleMessage "Stopping Postfix mail services"
/usr/sbin/postfix stop
fi
fi