Pages

Wednesday, July 7, 2010

Sendmail cotrolling script

I am posting one useful script to start, stop, restrat sendmail( Source code installation )

#! /bin/sh

case "$1" in
start)
echo "Starting SMTP port. (sendmail)"
/usr/sbin/sendmail -bd -q1h
;;
stop)
echo "Stopping down SMTP port:"
killall /usr/sbin/sendmail
;;
restart|reload)
$0 stop && $0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit 0

No comments:

Post a Comment