#!/bin/sh if [ "$1" = "stop" ] then postfix stop echo "Stopping amavisd-new..." /usr/local/sbin/amavisd stop exit 0 elif [ "$1" = "start" ] then echo "Starting amavisd-new..." /usr/local/sbin/amavisd postfix start exit 0 elif [ "$1" = "reload" ] then # recursively calls itself. mailer stop mailer start exit 0 else echo "Error!" echo "Usage: mailer [stop|start|reload]" exit 1 fi